httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Mueller (fastmail)" <r...@fastmail.fm>
Subject Re: libapreq problem and mozilla 0.97
Date Thu, 07 Feb 2002 03:49:53 GMT

> > Note the extra blank line, which I think the lack of is causing the
> > problem under 0.97.
>
> I'm pretty sure we can come up with a reasonable work-around for 1.0,
> but it would really help if you can:
>
>   1) rebuild libapreq with debugging:
>   % perl Makefile.PL DEFINE=-DDEBUG
>   % make && make install
>
>   2) test it again and submit both the raw upload data
>   and your error log to apreq-dev@httpd.apache.org.

I reinstalled above as described.

Test setup:

   <Location /test>
     SetHandler perl-script
     PerlHandler APTest
   </Location>

   <Perl>
   package APTest;
   use CGI qw(:all);

   sub handler {
     my $R = Apache::Request->new(+shift);
     my $Status = $R->parse;
     $R->content_type('text/html; charset=iso-8859-1');
     $R->send_http_header;
     print start_html('Test file upload'), "\n";
     print start_multipart_form('POST', '/test');
     print '<h1>Form file field test</h1>', "\n";
     print filefield(-name => 'fileupload', -size => 20);
     print submit('Do it');
     print end_html(), "\n";
   }

   </Perl>

I then go to http://localhost/test/ with mozilla, which gives me a page with
a file upload field. I don't select any file and click the 'Do it' button.
Mozilla then spins forever. I eventually hit the stop button, and get the
following in the logs.

[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line:
'-----------------------------17242207762954'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] find_boundary:
'-----------------------------17242207762954' ?=
'-----------------------------17242207762954'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line:
'Content-Disposition: form-data; name="fileupload"; filename=""'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1]
multipart_buffer_headers: 'Content-Disposition' = 'form-data;
name="fileupload"; filename=""'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line:
'Content-Type: application/octet-stream'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1]
multipart_buffer_headers: 'Content-Type' = 'application/octet-stream'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line: ''
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1]
multipart_buffer_read: 98 bytes
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1]
multipart_buffer_read: 0 bytes
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line: ''
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] find_boundary: '' ?=
'-----------------------------17242207762954'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line:
'-----------------------------17242207762954--'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] find_boundary:
'-----------------------------17242207762954--' ?=
'-----------------------------17242207762954'
[Thu Feb  7 10:24:53 2002] [error] [client 192.168.0.1] get_line: '(null)'


I setup a dummy http server which just dumps the request. This is the
result:

POST /test HTTP/1.0
Host: 192.168.0.2
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7)
Gecko/20011221
Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9,
image/png, imag
e/jpeg, image/gif;q=0.2, text/plain;q=0.8, text/css, */*;q=0.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Referer: http://192.168.0.2/test
Content-type: multipart/form-data;
boundary=---------------------------63341846741
Content-Length: 291

-----------------------------63341846741
Content-Disposition: form-data; name="fileupload"; filename=""
Content-Type: application/octet-stream

-----------------------------63341846741
Content-Disposition: form-data; name="Do it"

Do it
-----------------------------63341846741--

Hope this helps. I've attached a copy of this message as a text file, in
case any text wrapping causes problems working out what is where.

Rob



Mime
View raw message