Re: [libapreq] unknown content-type: `application/octet-stream'

Salvador Ortiz Garcia <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Organization Matías Software Group
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.