public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "ddaney at avtrex dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/26487] Weird handling of HTTP Headers
Date: Wed, 01 Mar 2006 17:10:00 -0000 [thread overview]
Message-ID: <20060301171028.14210.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26487-12276@http.gcc.gnu.org/bugzilla/>
------- Comment #10 from ddaney at avtrex dot com 2006-03-01 17:10 -------
Subject: Re: Weird handling of HTTP Headers
ifoox at redhat dot com wrote:
> ------- 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 appropriate to keep the headers in a Map than a List, especially
> since getHeaderFields() has to return a map, and most opeartions are just a
> simple getHeaderField(sometype). It seems that a LinkedHashMap (which Headers
> extends) should be able to handle same-name headers, because it will just chain
> them together. In theory :)
>
> If this doesn't work out, it might be possible to store it in a Map in a
> structure like: String -> [String, String, ...] where [] is a List. So we would
> always have a String to List mapping and the List may contain 1 or more values
> for that header.
>
> Does that make any sense? :)
You should be able to check-out the classpath HEAD and apply the patch
to that. Then copy the entire gnu/java/net/protocol/http directory
contents directly into the corresponding place in the classpath
directory of libgcj and rebuild.
My first attempt at fixing was to do as you suggested. The problem is
that you lose the order of the headers in the case where there were more
than one header of the same name. Enumerating the headers in the manner
of your test program becomes quite complicated. In the general case,
the ability to delete some headers complicates things further.
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 should not be
too bad.
I think I will get a second opinion from Tromey et al. ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26487
next prev parent reply other threads:[~2006-03-01 17:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 21:34 [Bug libgcj/26487] New: " ifoox at redhat dot com
2006-02-27 21:42 ` [Bug libgcj/26487] " ifoox at redhat dot com
2006-02-27 21:44 ` ifoox at redhat dot com
2006-02-27 21:47 ` ifoox at redhat dot com
2006-02-28 11:38 ` mark at gcc dot gnu dot org
2006-02-28 16:26 ` ifoox at redhat dot com
2006-02-28 16:27 ` ifoox at redhat dot com
2006-02-28 16:54 ` daney at gcc dot gnu dot org
2006-02-28 22:05 ` daney at gcc dot gnu dot org
2006-03-01 16:11 ` ifoox at redhat dot com
2006-03-01 17:10 ` ddaney at avtrex dot com [this message]
2006-03-01 18:10 ` ifoox at redhat dot com
2006-03-03 23:24 ` daney at gcc dot gnu dot org
2006-03-03 23:25 ` [Bug classpath/26487] " daney at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060301171028.14210.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=java-prs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).