httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dragon <dra...@crimson-dragon.com>
Subject Re: [users@httpd] Getting back HTTP as-is like plain text sometimes
Date Fri, 05 Sep 2008 17:32:45 GMT
Dobes Vandermeer did speak thusly:
> >
> > OK, so then are you certain that the content type header is always being
> > sent?
>
>Yes, as far as I can tell it is always included in the HTTP dump that
>I get.  Besides, which content-type includes the HTTP response headers
>in it?

I am not sure what you are asking there. As a result of an HTTP 
request to Apache, it will always send a series of headers before it 
sends content. I forget the exact specifics on this as I have not 
looked at the relevant RFC in quite a while. BTW, the relevant RFC 
for HTTP 1.1 is RFC2616

OK, after scanning through it pretty quickly, I have a suspicion what 
may be happening. When the HTTP server sends a response it sends a 
series of header lines including some details on the status of the 
request, a timestamp, and a variety of headers defining the content 
of the request. Each header line is terminated with a CRLF pair. The 
header section is then terminated with a blank line consisting of 
ONLY a CRLF pair. I suspect a blank line is getting to the browser 
before the end of the headers and definitely before the content type 
header. In such a case, the browser is likely to default to plain text.

> > I know you sent a list of headers in your original post and it was there,
> > but was that for a failed request or a successful one?
>
>It was a failed request - the only reason I had a copy of the headers
>was that I saw them in the browser window.

Which tends to support my theory above. If you saw them in the 
browser window, then the browser must have believed that the end of 
headers had already been sent and took everything beyond that to be 
plain text content.

This will require some more digging. If you have Firefox installed, 
you can use the LiveHeaders plugin to capture the request and 
response headers when you load the page. Or if you have a Linux or 
similar machine that supports wget, you can use it to do the same.

> > Other than that, I am at a loss as to what might be happening.
>
>Me too :-(  I wish I could reproduce this more frequently so that I
>could file a bug or something

Well, we need a real good look at the HTTP transaction to determine that.

You may need to do some more digging beyond that to see where the 
problem is occuring.

Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message