--- Begin Message ---
- From: Anthony Green <green at redhat dot com>
- To: classpath-patches <classpath-patches at gnu dot org>
- Date: Mon, 16 Jan 2006 06:38:35 -0800
- Subject: Patch: fix Content-Encoding for compressed HTTP responses
I found this while debugging Azureus. We automatically decompress
compressed HTTP responses, but still report them as having compressed
content. This patch removes the Content-Encoding header in these
cases. This appears to be what Sun does in these cases. Ok?
tromey: I would also like to apply this to GCC HEAD and the 4.1 branch
(for FC5).
Thanks,
AG
2006-01-16 Anthony Green <green@redhat.com>
PR classpath/25803
* gnu/java/net/protocol/http/Request.java (createResponseBodyStream):
Remove Content-Encoding for compressed streams.
--- gnu/java/net/protocol/http/Request.java.~1.6.~ 2005-10-12 12:48:25.000000000 -0700
+++ gnu/java/net/protocol/http/Request.java 2006-01-16 05:17:42.000000000 -0800
@@ -528,6 +528,9 @@
throw new ProtocolException("Unsupported Content-Encoding: " +
contentCoding);
}
+ // Remove the Content-Encoding header because the content is
+ // no longer compressed.
+ responseHeaders.remove("Content-Encoding");
}
return in;
}
--- End Message ---