httpd: don't send error messages with gzip encoding
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 25 Mar 2011 12:38:52 +0000 (13:38 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 27 Mar 2011 21:26:33 +0000 (23:26 +0200)
If CONFIG_FEATURE_HTTPD_GZIP is enabled and request contained
'Accept-Encoding: gzip', then errors were sent with 'Content-Encoding: gzip'
even though they aren't.

Fix it by clearing content_gzip before sending the headers.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/httpd.c

index b8113a8431ee3702b28c4ed17af194d2bdbb2ba4..9c1aa2a6f5277a2e8598a31bcc86c2b7ebd2f47e 100644 (file)
@@ -1065,6 +1065,7 @@ static void send_headers(int responseNum)
 static void send_headers_and_exit(int responseNum) NORETURN;
 static void send_headers_and_exit(int responseNum)
 {
+       IF_FEATURE_HTTPD_GZIP(content_gzip = 0;)
        send_headers(responseNum);
        log_and_exit();
 }