From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31162 invoked by alias); 27 Feb 2006 21:47:36 -0000 Received: (qmail 31143 invoked by uid 48); 27 Feb 2006 21:47:35 -0000 Date: Mon, 27 Feb 2006 21:47:00 -0000 Message-ID: <20060227214735.31142.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libgcj/26487] Weird handling of HTTP Headers In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "ifoox at redhat dot com" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q1/txt/msg00246.txt.bz2 List-Id: ------- Comment #3 from ifoox at redhat dot com 2006-02-27 21:47 ------- Here's what the output of URLConnection.getHeaderFields() is for GCJ: {null=[HTTP/1.1 200 OK], Date=[Mon, 27 Feb 2006 21:34:40 GMT], Server=[Apache/2.0.46 (Red Hat)], Set-Cookie=[Bugzilla_login=192617; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT, Bugzilla_logincookie=653228; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT], Keep-Alive=[timeout=15, max=100], Connection=[Keep-Alive], Transfer-Encoding=[chunked], Content-Type=[text/html; charset=]} Here's the output for Sun 1.5: {Connection=[Keep-Alive], Set-Cookie=[Bugzilla_logincookie=653232; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT, Bugzilla_login=192617; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT], null=[HTTP/1.1 200 OK], Date=[Mon, 27 Feb 2006 21:35:37 GMT], Keep-Alive=[timeout=15, max=100], Server=[Apache/2.0.46 (Red Hat)], Content-Type=[text/html; charset=], Transfer-Encoding=[chunked]} These are the same, but when I loop through the headers and print them out here's what GCJ produces: null: 'HTTP/1.1 200 OK' Date: 'Mon, 27 Feb 2006 21:34:40 GMT' Server: 'Apache/2.0.46 (Red Hat)' Set-Cookie: 'Bugzilla_login=192617; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT, Bugzilla_logincookie=653228; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT' Keep-Alive: 'timeout=15, max=100' Connection: 'Keep-Alive' Transfer-Encoding: 'chunked' Content-Type: 'text/html; charset=' and here's Sun: null: 'HTTP/1.1 200 OK' Date: 'Mon, 27 Feb 2006 21:35:37 GMT' Server: 'Apache/2.0.46 (Red Hat)' Set-Cookie: 'Bugzilla_login=192617; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT' Set-Cookie: 'Bugzilla_logincookie=653232; path=/bugzilla; expires=Fri, 01-Jan-2038 00:00:00 GMT' Keep-Alive: 'timeout=15, max=100' Connection: 'Keep-Alive' Transfer-Encoding: 'chunked' Content-Type: 'text/html; charset=' So it seems like libgcj's version of these 2 functions considers the two instances of Set-Cookie to be one header whereas Sun considers them to be 2 separate headers. IBM 1.4.1 shows them as 2 seperate headers, although it returns an empty Map from URLConnection.getHeaderFields() for some reason. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26487