Summary: | mod_deflate compresses content wrongly | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | John Huong <jahuong> |
Component: | mod_deflate | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0.46 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | All | ||
Attachments: |
Loop test log file
accept-encoding parsing fix |
Description
John Huong
2003-07-11 18:32:53 UTC
First: please try 2.0.47, which contains some further fixes. Second: I can't believe, that mod_deflate compresses gzip if Accept-Encoding: contains no gzip. I'd guess the compression takes place somewhere else. Hi, sorry for the cross post. Anyway I'm sure it is a mod_deflate problem as everything works fine for the last 5 hours after I try the work around as describe in bug 9222. My problem would normally appear every now and then within an hour or two. I will try Apache 2.0.47 later on and see if I get the same problem. Ok I've upgraded to 2.0.47 this morning. I've done the tests with 5 SOAP::Lite clients sending 500 various types of requests(both valid and errorneous) each and without any special setenvif settings, and none of the server responses are gzipped. Looks great. Just curious, how come the 2.0.47 release didn't mention anything about fixing mod_deflate.. or was this problem attributed to other Apache components? Thanks. Oops... In fact,the changes were made in 2.0.46. Strange. This points to other sources of error as well, IMHO. I'll close the report for now. Don't hesitate to reopen it, if there are further issues. Thanks for using Apache! Created attachment 7491 [details]
Loop test log file
Looks like I spoke too soon. I'm attaching the complete log file of my most recent loop test. Hmm. The point is, mod_deflate only gets active, if the filter (DEFLATE) is added *and* Accept-Encoding contains the gzip token. Did you add the filter somehow? What's the particular configuration? Here are my settings for the filters. <Directory /> Options FollowSymLinks AllowOverride None Order Deny,Allow Deny from all AddOutputFilterByType DEFLATE text/html text/plain text/xml AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript </Directory> # DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" In:% {instream}n Out:%{outstream}n:%{ratio}npct" comdef Oh by the way.. the workaround in bug 9222 doesn't work either... the problem still happens intermittently. Well, and it does actually log instream/outstream/ratio for these requests? I'll attach the access logs once I return from work. Here is the line in the access log that matches the last entry in the attached log file. 127.0.0.1 - - [23/Jul/2003:08:07:50 +0800] "POST /testsoap.php HTTP/1.1" 200 268 "-" "SOAP::Lite/Perl/0.55" In:245 Out:250:102pct Just to separate the two separate issues here: 1) if you think that mod_deflate is gzip-encoding a response where the request did not have "gzip" in an Accept-Encoding header, can you attach a network trace against 2.0.47, or a log which includes the input and output headers (e.g a CustomLog with "%{accept-encoding}i {content-encoding}o" 2) mod_deflate will indeed gzip-encode a response which already has Content-Encoding: deflate (given Accept-Encoding: gzip in the request, etc); this is a different issue. Ok I just tried what was recommended.. and I hit it again. Here is the output of the log. 127.0.0.1 - - [25/Jul/2003:23:35:52 +0800] "POST /testsoap.php HTTP/1.1" 200 268 "-" "SOAP::Lite/Perl/0.55" In:245 Out:250:102pct "deflate" "deflate, gzip" Here's the logformat from my httpd.conf LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" In:% {instream}n Out:%{outstream}n:%{ratio}npct \"%{Accept-Encoding}i\" \"%{Content- Encoding}o\"" comdef Created attachment 7518 [details]
accept-encoding parsing fix
I may be on a wild goose chase, but can you try that patch? Sorry, unfortunately I don't have any compilers with me right now on my Windows system and at home. Is there something like a nightly build I could run my tests against? Any chances of this being fixed in 2.0.48? Ha, Joe, you've found the problem! We skip the \0 delimiter and search somewhere in the memory... Therefore it occurs *sometimes*. I've finally committed a fix to 2.1 and proposed it for backport. Thanks! already fixed in 2.0.48 :) |