On 08/11/2011 09:47 PM, silent wrote:
hi, list

I'm using a javascript ajax file uploader, but get this error with mod_perl1.

the js code is like:

         var xhr = new XMLHttpRequest();

         xhr.open("POST", queryString, true);
         xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
         xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
         xhr.setRequestHeader("Content-Type", "application/octet-stream");
         xhr.send(file);
libapreq can only parse 'application/x-www-form-urlencoded' or 'multipart/form-data'.

So if you want use Apache::Request (libapreq) and handle file uploads, you should use a Content-Type of 'multipart/form-data'.

Or write your own request parser.

Regards.

Salvador Ortiz.

Reply via email to