Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gav (2710)

  (email not shown publicly)
AOL IM: flufflegavin (Add Buddy, Send Message)

Hacker in NYC.

Journal of gav (2710)

Thursday September 30, 2004
05:34 PM

HTTP Gzip Woes

[ #21127 ]

We've had a reports over the last couple months or so about getting garbled pages with Mozilla from our web app. I had a sneaking suspicion that it was something to do with mod_gzip because the page looked like you had opened a compressed file in your favorite editor. It was one of those bugs that was extra infuriating because I couldn't reproduce it and it seemed to go away every time more than one coworker was looking. Today I spotted it while looking at an unrelated problem and dug about in the server logs until I spotted this:

XX.XX.XX.XX - - [30/Sep/2004:15:37:34 -0400] "GET /bar.html HTTP/1.1" 200 5217 "" "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10"
XX.XX.XX.XX - - [30/Sep/2004:15:37:34 -0400] "GET /bar.html HTTP/1.1" 206 31451 "" "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10"

Consulting RFC2616 (Hypertext Transfer Protocol -- HTTP/1.1) tells me that 206 is the status code for Partial Content. But why is FireFox requesting the document twice? I had a faint recollection that I read something about this before (yay blogs!) and it turns out the Blog*Spot had similar issues.

It seems that setting the charset as a HTTP header instead of a META tag fixes the problem, I simply added an AddDefaultCharset directory into the Apache configuration and everything seems good.

Whilst looking for charset help, I found out that MySQL 4.1 will have better Unicode support and this funky regexp.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.