You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2002/07/08 16:52:29 UTC

bug in reading folded requests?

This request used to work fine, and mod_gzip worked its magic as long
as the configuration was okay:

"GET /manual/mod/mod_rewrite.html.en HTTP/1.1\r\nHost: 127.0.0.1\r\nAccept-Encoding:    \r\n     gzip\r\n\r\n"

Here is the response:


HTTP/1.1 400 Bad Request
Date: Mon, 08 Jul 2002 14:44:16 GMT
Server: Apache/2.0.40-dev (Unix) DAV/2
Content-Length: 301
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Request header field is missing ':' separator.<br />
<pre>
     gzip</pre>
</p>
</body></html>



-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Re: bug in reading folded requests?

Posted by Brian Pane <br...@apache.org>.
Jeff Trawick wrote:

>This is from line 837, as we bail out with 400 error:
>
>(gdb) dump_table tmp_headers
>[0] 'Host'='127.0.0.1'
>[1] 'Accept-Encoding'=''
>
>I think the problem is that the code now expects that a continuation
>line starts with a tab.  That is not the case in this testcase.
>Neither 1.3 nor older levels of 2.0 expect a tab at the start of the
>continuation line.
>

That explains it, thanks.  I'll commit a fix later today if nobody
else gets to it first.

--Brian



Re: bug in reading folded requests?

Posted by Jeff Trawick <tr...@attglobal.net>.
Brian Pane <bp...@pacbell.net> writes:

> On Mon, 2002-07-08 at 07:52, Jeff Trawick wrote:
> > This request used to work fine, and mod_gzip worked its magic as long
> > as the configuration was okay:
> > 
> > "GET /manual/mod/mod_rewrite.html.en HTTP/1.1\r\nHost: 127.0.0.1\r\nAccept-Encoding:    \r\n     gzip\r\n\r\n"
> 
> There's new parsing logic for this case, as of a couple of days ago,
> but this example works on my system (I don't have mod_deflate loaded,
> but I just did an equivalent test for other request header fields using
> tabbed continuations).
> 
> Can you dump the contents of tmp_headers in ap_get_mime_headers_core()
> (server/protocol.c at line 880)?

This is from line 837, as we bail out with 400 error:

(gdb) dump_table tmp_headers
[0] 'Host'='127.0.0.1'
[1] 'Accept-Encoding'=''

I think the problem is that the code now expects that a continuation
line starts with a tab.  That is not the case in this testcase.
Neither 1.3 nor older levels of 2.0 expect a tab at the start of the
continuation line.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Re: bug in reading folded requests?

Posted by Brian Pane <bp...@pacbell.net>.
On Mon, 2002-07-08 at 07:52, Jeff Trawick wrote:
> This request used to work fine, and mod_gzip worked its magic as long
> as the configuration was okay:
> 
> "GET /manual/mod/mod_rewrite.html.en HTTP/1.1\r\nHost: 127.0.0.1\r\nAccept-Encoding:    \r\n     gzip\r\n\r\n"

There's new parsing logic for this case, as of a couple of days ago,
but this example works on my system (I don't have mod_deflate loaded,
but I just did an equivalent test for other request header fields using
tabbed continuations).

Can you dump the contents of tmp_headers in ap_get_mime_headers_core()
(server/protocol.c at line 880)?

Thanks,
--Brian