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

Reply via email to