[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: fix Content-Encoding for compressed HTTP responses
From: |
Anthony Green |
Subject: |
[cp-patches] Patch: fix Content-Encoding for compressed HTTP responses |
Date: |
Mon, 16 Jan 2006 06:38:32 -0800 |
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 <address@hidden>
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;
}
- [cp-patches] Patch: fix Content-Encoding for compressed HTTP responses,
Anthony Green <=