Re: Handling multipart/form-data requests via Apache Module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you can access the POST data then it should be a matter of decoding
the mime string and get the multipart data out.

Are you writing your module in C, Perl or Python?

On Thu, Jan 21, 2010 at 5:07 AM, Jain Sachinkumar <sajain1@xxxxxxxx> wrote:
> Hello,
>
> We are interested in logging HTTP requests that are sent to web
> applications hosted on the Apache web server. Eventually, as part of a
> larger research project, we would like to be able to replay these requests
> automatically on the web application. For this purpose, we have developed
> an Apache module which logs HTTP GET and POST requests and associated data
> in a seperate file. In this module, I am able to log data that is
> associated with a POST request, but I am having difficulty handling
> multipart/form-data requests and was hoping I could get some help from the
> community on this.
>
> Consider for example, the following form
>
> upload.html
> <form enctype="multipart/form-data" action="uploader.php" method="POST">
> Last Name:  <input type="text" name="lname" size="20" /><br />
> Choose a file to upload: <input name="uploadedfile" type="file" /><br />
> <input type="submit" value="Upload File" />
> </form>
>
> uploader.php
> This is the php script which will handles the file that is sent through
> the HTML page.
>
> In our logger, we already have the functionality to log the 'lname',
> 'uploadedfile' fields and their values. But, in addition to the file's
> name which comes as a value of the 'uplaodedfile' form field, we would
> like to get the file's contents as well. We would like to save the file to
> a predetermined location, for e.g., if the user uploads a zip file, we
> would like the logger to store the zip file before passing it on to the
> web application.
>
> Is there a way to get the file contents in a logger software that is
> sitting on Apache between the user and the web application. Any
> suggestions/advice would be appreciated.
>
> Regards,
> - Sachin Jain
> Research Assistant,
> Information Systems Department,
> University of Maryland, Baltimore County
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>



-- 
Follow me on Twitter, http://twitter.com/mdevraj

"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux