harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer" <ndbe...@apache.org>
Subject Re: [classlib] [luni] HttpURLConnection does not have the "Accept" header (HARMONY-6036)
Date Tue, 09 Dec 2008 03:58:30 GMT
2008/12/8 Kevin Zhou <zhoukevin83@gmail.com>:
> Maybe this violates the HTTP/1.1 spec, should we abandon these servers?
> No, I don't think so. RI, IE and Firefox all send Accept header to support
> such servers.
> Why don't we follow this as well to satisfy with our potential clients?

I don't think the question is about setting Accept or not, it's the
actual value used. It's not surprising that IE and Firefox and most
web browesrs set an Accept that says they know HTML, GIFs and JPEGs -
they are web browsers, that's what they do. This isn't a web browser,
this is just a raw HTTP socket connection. It has no knowledge of what
the code using it would prefer.

Yes we should be compatible with the RI, but we should also try not to
be silly. I suggest setting Accept to just be a wildcard. This should
satisfy all conditions.


> On Tue, Dec 9, 2008 at 9:55 AM, 李竞沁 <littlee1032@gmail.com> wrote:
>> Hi Kevin,I have these questions:
>> 1. What will the server, which is not compatible with HTTP 1.1, do if it
>> receives a HTTP 1.1 request? ( Our HTTP header has told that it is a HTTP
>> 1.1 request.)
>> 2. Should this be a server's misbehavior because spec does not insist send
>> accept header? Or are there any common rules to guide this behavior? ( Do
>> we
>> only miss accept header?)
>> On Tue, Dec 9, 2008 at 9:44 AM, Kevin Zhou <zhoukevin83@gmail.com> wrote:
>> > Charles wrote,
>> > > The spec of Http said that "all headers except Host are optional." It
>> is
>> > what the RI does.
>> >
>> > Yes, I think we should be compatible with RI's behaviors.
>> >
>> --
>> Yours sincerely,
>> Charles Lee
View raw message