This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI... [Fwd: Patch: fix Content-Encoding for compressed HTTP responses]


I've moved this patch over from GNU Classpath to the GCC 4.1 branch (but
not HEAD).

Thanks,

AG


--- Begin Message ---
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 ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]