httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jain Sachinkumar" <saja...@umbc.edu>
Subject [users@httpd] Handling multipart/form-data requests via Apache Module
Date Wed, 20 Jan 2010 18:07:02 GMT
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message