ReportedBy: ifoox at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26487
--- Comment #1 from ifoox at redhat dot com 2006-02-27 21:42 ---
On further investigation it seems like the headers are represented similarly
when they are recieved but URLConnection.getHeaderFieldKey and
URLConnection.getHeaderField don't behave as expected.
--
ifoox at redha
--- Comment #2 from ifoox at redhat dot com 2006-02-27 21:44 ---
Created an attachment (id=10926)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10926&action=view)
Test case
Compile simply with 'TestLoginCookie.java' and run with 'java TestLoginCookie'
--- 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=/bug
--- Comment #5 from ifoox at redhat dot com 2006-02-28 16:26 ---
Having looked at the Javadoc for these functions, Mark's description is
correct. Only that the function names are getHeaderField(int) (and
getHeaderFieldKey(int)), getHeaderField(String), and getHeaderFields().
--- Comment #6 from ifoox at redhat dot com 2006-02-28 16:27 ---
Created an attachment (id=10939)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10939&action=view)
Non-https test case
This test case uses http instead of https, it also exercises
getHeaderField(String) in a
--- Comment #9 from ifoox at redhat dot com 2006-03-01 16:11 ---
Hi David,
I tried to get classpath and try out applying the patch to test it out, but I
had some problems with it. I'll try again in a bit but I have some general
comments in the meanwhile.
It seems more appropria
--- Comment #11 from ifoox at redhat dot com 2006-03-01 18:10 ---
> I gave up and went down the road of a somewhat simpler implementation at
> the expense of lookup overhead. In most cases there are fewer than
> about a dozen headers, so linear searching an ArrayList shou