You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2001/02/28 11:50:52 UTC

Corrupted headers with Apache2.0

Hi,

I have noted that the headers are corrupted...
+++
apache20@vtxclere:~/apache/httpd-2.0 > telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP1.1

HTTP/1.1 200 OK
É:Date: Wed, 28 Feb 2001 10:35:02 GMT
Server: Apache/2.0.14-dev (Unix)
Content-Location: index.html.en
Vary: negotiate,accept-language,accept-charset
TCN: choice
Last-Modified: Fri, 19 Jan 2001 19:44:36 GMT
ETag: "a9c-51f-8abd9100;f08b92c0"
Accept-Ranges: bytes
Content-Length: 1311
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en
Expires: Wed, 28 Feb 2001 10:35:02 GMT

ÁDate: Wed, 28 Feb 2001 10:46:25 GMT
Server: Apache/2.0.14-dev (Unix)
Content-Location: index.html.en
Vary: negotiate,accept-language,accept-charset
TCN: choice
Last-Modified: Fri, 19 Jan 2001 19:44:36 GMT
ETag: "a9c-51f-8abd9100;f08b92c0"
Accept-Ranges: bytes
Content-Length: 1311
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en
Expires: Wed, 28 Feb 2001 10:46:25 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Test Page for Apache Installation</TITLE>
+++
Is someone working on this problem?

Cheers

Jean-frederic

Re: Corrupted headers with Apache2.0

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Wed, Feb 28, 2001 at 12:59:20PM +0100, Martin Kraemer wrote:
> 
> Here's the command I enter, and the result I get (server running on port 8007):
> 
> % echo "GET / HTTP/1.0\n" | nc localhost 8007 | cat -v | sed 's|\^@\^@\(\^@\)*\^@\^@|^@^@..^@^@|g'
> HTTP/1.1 200 OK^M
> BLIC "-//IETF//DTD HTML 2.0//EN">
[...]
> ^@^@..^@^@Date: Wed, 28 Feb 2001 11:53:02 GMT^M
> Server: Apache/2.0.14-dev (Unix) DAV/2^M
> ^@^@..^@^@Content-Location: index.html.en^M
> Vary: negotiate,accept-language,accept-charset^M
> ^@^@..^@^@TCN: choice^M

Just to clarify: I can see it, but I am not "working on it".

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: Corrupted headers with Apache2.0

Posted by Martin Kraemer <Ma...@fujitsu-siemens.com>.
On Wed, Feb 28, 2001 at 07:16:32AM -0800, rbb@covalent.net wrote:
> 
> This should be fixed now.  Would people please test and let me know if my
> fix solved it.  If you haven't seen the fix, it was completely in
> apr-util, so the CVS commit message went to the apr-cvs list.

Yep, fixed. Thanks.

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: Corrupted headers with Apache2.0

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
rbb@covalent.net wrote:

Yes that Ok now

Thanks

Jean-frederic

> 
> This should be fixed now.  Would people please test and let me know if my
> fix solved it.  If you haven't seen the fix, it was completely in
> apr-util, so the CVS commit message went to the apr-cvs list.
> 
> Ryan
> 
> On Wed, 28 Feb 2001 rbb@covalent.net wrote:
> 
> >
> > The problem is easy to debug, but I haven't had a chance to fix it yet.
> > We have set the b->length field incorrectly for heap buckets.  This is
> > related to the bucket changes from last night.  Basically, the length used
> > to store how much data is in the bucket for heap buckets, regardless of
> > how much is allocated.  Now, it is how much is allocated + how much is
> > used.
> >
> > This is obviously a bug.  Fix is imminent, assuming I don't get swamped as
> > soon as I reach the office.
> >
> > Ryan
> >
> > On Wed, 28 Feb 2001, Martin Kraemer wrote:
> >
> > > (I recommend netcat (nc) and  "cat -v".)
> > >
> > > Yes, I can reproduce this with a snapshot of apache-2.0 from three hours
> > > ago. On my server (Apache/2.0.14-dev prefork), I get
> > > 1) garbage between the response line "HTTP/1.1 200 OK" and the first MIME header
> > > 2) thousands of NIL characters at the beginning of each MIME header line
> > >    (made visible by "cat -v" and collapsed from ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
> > >    into a shorter "^@^@..^@^@" in the following display)
> > >
> > > Here's the command I enter, and the result I get (server running on port 8007):
> > >
> > > % echo "GET / HTTP/1.0\n" | nc localhost 8007 | cat -v | sed 's|\^@\^@\(\^@\)*\^@\^@|^@^@..^@^@|g'
> > > HTTP/1.1 200 OK^M
> > > BLIC "-//IETF//DTD HTML 2.0//EN">
> > > <HTML><HEAD>
> > > <TITLE>200 OK</TITLE>
> > > </HEAD><BODY>
> > > <H1>OK</H1>
> > > The server encountered an internal error or
> > > misconfiguration and was unable to complete
> > > your request.<P>
> > > Please contact the server administrator,
> > >  WebMaster+Apache2.0@deejai.mch.fsc.net and inform them of the time the error occurred,
> > > and anything you might have done that may have
> > > caused the error.<P>
> > > More information about this error may be available
> > > in the server error log.<P>
> > > <HR>
> > > <ADDRESS>Apache/2.0.14-dev Server at <A HREF="mailto:WebMaster+Apache2.0@deejai.mch.fsc.net">deejai2.mch.fsc.net</A> Port 8007</ADDRESS>
> > > </BODY></HTML>
> > > ^@^@..^@^@Date: Wed, 28 Feb 2001 11:53:02 GMT^M
> > > Server: Apache/2.0.14-dev (Unix) DAV/2^M
> > > ^@^@..^@^@Content-Location: index.html.en^M
> > > Vary: negotiate,accept-language,accept-charset^M
> > > ^@^@..^@^@TCN: choice^M
> > > Last-Modified: Sat, 20 Jan 2001 02:01:20 GMT^M
> > > ^@^@..^@^@ETag: "1588a-51f-ce0b3c00;27dbbac0"^M
> > > Accept-Ranges: bytes^M
> > > ^@^@..^@^@Content-Length: 1311^M
> > > Connection: close^M
> > > ^@^@..^@^@Content-Type: text/html; charset=ISO-8859-1^M
> > > Content-Language: en^M
> > > ^@^@..^@^@Expires: Wed, 28 Feb 2001 11:53:02 GMT^M
> > > ^M
> > > ^@^@..^@^@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> > > <HTML>
> > >  <HEAD>
> > >   <TITLE>Test Page for Apache Installation</TITLE>
> > >  </HEAD>
> > >  [...rest truncated]
> > >
> > >    Martin
> > > --
> > > <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
> > >        <ma...@apache.org>              |   81730  Munich,  Germany
> > >
> > >
> >
> >
> > _______________________________________________________________________________
> > Ryan Bloom                            rbb@apache.org
> > 406 29th St.
> > San Francisco, CA 94131
> > -------------------------------------------------------------------------------
> >
> >
> >
> 
> _______________________________________________________________________________
> Ryan Bloom                              rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

Re: Corrupted headers with Apache2.0

Posted by rb...@covalent.net.
This should be fixed now.  Would people please test and let me know if my
fix solved it.  If you haven't seen the fix, it was completely in
apr-util, so the CVS commit message went to the apr-cvs list.

Ryan

On Wed, 28 Feb 2001 rbb@covalent.net wrote:

>
> The problem is easy to debug, but I haven't had a chance to fix it yet.
> We have set the b->length field incorrectly for heap buckets.  This is
> related to the bucket changes from last night.  Basically, the length used
> to store how much data is in the bucket for heap buckets, regardless of
> how much is allocated.  Now, it is how much is allocated + how much is
> used.
>
> This is obviously a bug.  Fix is imminent, assuming I don't get swamped as
> soon as I reach the office.
>
> Ryan
>
> On Wed, 28 Feb 2001, Martin Kraemer wrote:
>
> > (I recommend netcat (nc) and  "cat -v".)
> >
> > Yes, I can reproduce this with a snapshot of apache-2.0 from three hours
> > ago. On my server (Apache/2.0.14-dev prefork), I get
> > 1) garbage between the response line "HTTP/1.1 200 OK" and the first MIME header
> > 2) thousands of NIL characters at the beginning of each MIME header line
> >    (made visible by "cat -v" and collapsed from ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
> >    into a shorter "^@^@..^@^@" in the following display)
> >
> > Here's the command I enter, and the result I get (server running on port 8007):
> >
> > % echo "GET / HTTP/1.0\n" | nc localhost 8007 | cat -v | sed 's|\^@\^@\(\^@\)*\^@\^@|^@^@..^@^@|g'
> > HTTP/1.1 200 OK^M
> > BLIC "-//IETF//DTD HTML 2.0//EN">
> > <HTML><HEAD>
> > <TITLE>200 OK</TITLE>
> > </HEAD><BODY>
> > <H1>OK</H1>
> > The server encountered an internal error or
> > misconfiguration and was unable to complete
> > your request.<P>
> > Please contact the server administrator,
> >  WebMaster+Apache2.0@deejai.mch.fsc.net and inform them of the time the error occurred,
> > and anything you might have done that may have
> > caused the error.<P>
> > More information about this error may be available
> > in the server error log.<P>
> > <HR>
> > <ADDRESS>Apache/2.0.14-dev Server at <A HREF="mailto:WebMaster+Apache2.0@deejai.mch.fsc.net">deejai2.mch.fsc.net</A> Port 8007</ADDRESS>
> > </BODY></HTML>
> > ^@^@..^@^@Date: Wed, 28 Feb 2001 11:53:02 GMT^M
> > Server: Apache/2.0.14-dev (Unix) DAV/2^M
> > ^@^@..^@^@Content-Location: index.html.en^M
> > Vary: negotiate,accept-language,accept-charset^M
> > ^@^@..^@^@TCN: choice^M
> > Last-Modified: Sat, 20 Jan 2001 02:01:20 GMT^M
> > ^@^@..^@^@ETag: "1588a-51f-ce0b3c00;27dbbac0"^M
> > Accept-Ranges: bytes^M
> > ^@^@..^@^@Content-Length: 1311^M
> > Connection: close^M
> > ^@^@..^@^@Content-Type: text/html; charset=ISO-8859-1^M
> > Content-Language: en^M
> > ^@^@..^@^@Expires: Wed, 28 Feb 2001 11:53:02 GMT^M
> > ^M
> > ^@^@..^@^@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> > <HTML>
> >  <HEAD>
> >   <TITLE>Test Page for Apache Installation</TITLE>
> >  </HEAD>
> >  [...rest truncated]
> >
> >    Martin
> > --
> > <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
> >        <ma...@apache.org>              |   81730  Munich,  Germany
> >
> >
>
>
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------
>
>
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: Corrupted headers with Apache2.0

Posted by rb...@covalent.net.
The problem is easy to debug, but I haven't had a chance to fix it yet.
We have set the b->length field incorrectly for heap buckets.  This is
related to the bucket changes from last night.  Basically, the length used
to store how much data is in the bucket for heap buckets, regardless of
how much is allocated.  Now, it is how much is allocated + how much is
used.

This is obviously a bug.  Fix is imminent, assuming I don't get swamped as
soon as I reach the office.

Ryan

On Wed, 28 Feb 2001, Martin Kraemer wrote:

> (I recommend netcat (nc) and  "cat -v".)
>
> Yes, I can reproduce this with a snapshot of apache-2.0 from three hours
> ago. On my server (Apache/2.0.14-dev prefork), I get
> 1) garbage between the response line "HTTP/1.1 200 OK" and the first MIME header
> 2) thousands of NIL characters at the beginning of each MIME header line
>    (made visible by "cat -v" and collapsed from ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
>    into a shorter "^@^@..^@^@" in the following display)
>
> Here's the command I enter, and the result I get (server running on port 8007):
>
> % echo "GET / HTTP/1.0\n" | nc localhost 8007 | cat -v | sed 's|\^@\^@\(\^@\)*\^@\^@|^@^@..^@^@|g'
> HTTP/1.1 200 OK^M
> BLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>200 OK</TITLE>
> </HEAD><BODY>
> <H1>OK</H1>
> The server encountered an internal error or
> misconfiguration and was unable to complete
> your request.<P>
> Please contact the server administrator,
>  WebMaster+Apache2.0@deejai.mch.fsc.net and inform them of the time the error occurred,
> and anything you might have done that may have
> caused the error.<P>
> More information about this error may be available
> in the server error log.<P>
> <HR>
> <ADDRESS>Apache/2.0.14-dev Server at <A HREF="mailto:WebMaster+Apache2.0@deejai.mch.fsc.net">deejai2.mch.fsc.net</A> Port 8007</ADDRESS>
> </BODY></HTML>
> ^@^@..^@^@Date: Wed, 28 Feb 2001 11:53:02 GMT^M
> Server: Apache/2.0.14-dev (Unix) DAV/2^M
> ^@^@..^@^@Content-Location: index.html.en^M
> Vary: negotiate,accept-language,accept-charset^M
> ^@^@..^@^@TCN: choice^M
> Last-Modified: Sat, 20 Jan 2001 02:01:20 GMT^M
> ^@^@..^@^@ETag: "1588a-51f-ce0b3c00;27dbbac0"^M
> Accept-Ranges: bytes^M
> ^@^@..^@^@Content-Length: 1311^M
> Connection: close^M
> ^@^@..^@^@Content-Type: text/html; charset=ISO-8859-1^M
> Content-Language: en^M
> ^@^@..^@^@Expires: Wed, 28 Feb 2001 11:53:02 GMT^M
> ^M
> ^@^@..^@^@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> <HTML>
>  <HEAD>
>   <TITLE>Test Page for Apache Installation</TITLE>
>  </HEAD>
>  [...rest truncated]
>
>    Martin
> --
> <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
>        <ma...@apache.org>              |   81730  Munich,  Germany
>
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Re: Corrupted headers with Apache2.0

Posted by Cliff Woolley <cl...@yahoo.com>.
On Wed, 28 Feb 2001, Martin Kraemer wrote:

> Yes, I can reproduce this with a snapshot of apache-2.0 from three hours
> ago. On my server (Apache/2.0.14-dev prefork), I get
> 1) garbage between the response line "HTTP/1.1 200 OK" and the first MIME header
> 2) thousands of NIL characters at the beginning of each MIME header line
>    (made visible by "cat -v" and collapsed from ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
>    into a shorter "^@^@..^@^@" in the following display)

There's an large chance that this is due to a bug somewhere in the buckets
code I checked in yesterday.  I'll review my changes (again)... but the
strange part is that it works for me.  It'd help if I had more details
about your platform... MMAP or not?  Sendfile or not?

--Cliff


Re: Corrupted headers with Apache2.0

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
(I recommend netcat (nc) and  "cat -v".)

Yes, I can reproduce this with a snapshot of apache-2.0 from three hours
ago. On my server (Apache/2.0.14-dev prefork), I get
1) garbage between the response line "HTTP/1.1 200 OK" and the first MIME header
2) thousands of NIL characters at the beginning of each MIME header line
   (made visible by "cat -v" and collapsed from ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
   into a shorter "^@^@..^@^@" in the following display)

Here's the command I enter, and the result I get (server running on port 8007):

% echo "GET / HTTP/1.0\n" | nc localhost 8007 | cat -v | sed 's|\^@\^@\(\^@\)*\^@\^@|^@^@..^@^@|g'
HTTP/1.1 200 OK^M
BLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>200 OK</TITLE>
</HEAD><BODY>
<H1>OK</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
 WebMaster+Apache2.0@deejai.mch.fsc.net and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apache/2.0.14-dev Server at <A HREF="mailto:WebMaster+Apache2.0@deejai.mch.fsc.net">deejai2.mch.fsc.net</A> Port 8007</ADDRESS>
</BODY></HTML>
^@^@..^@^@Date: Wed, 28 Feb 2001 11:53:02 GMT^M
Server: Apache/2.0.14-dev (Unix) DAV/2^M
^@^@..^@^@Content-Location: index.html.en^M
Vary: negotiate,accept-language,accept-charset^M
^@^@..^@^@TCN: choice^M
Last-Modified: Sat, 20 Jan 2001 02:01:20 GMT^M
^@^@..^@^@ETag: "1588a-51f-ce0b3c00;27dbbac0"^M
Accept-Ranges: bytes^M
^@^@..^@^@Content-Length: 1311^M
Connection: close^M
^@^@..^@^@Content-Type: text/html; charset=ISO-8859-1^M
Content-Language: en^M
^@^@..^@^@Expires: Wed, 28 Feb 2001 11:53:02 GMT^M
^M
^@^@..^@^@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Test Page for Apache Installation</TITLE>
 </HEAD>
 [...rest truncated]

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany