harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou" <zhoukevi...@gmail.com>
Subject Re: [classlib] [luni] HttpURLConnection does not have the "Accept" header (HARMONY-6036)
Date Mon, 08 Dec 2008 13:03:36 GMT
The Accept request-header field can be used to specify certain media types
which are acceptable for the response.
The Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 is acquired
when conducting HeaderTest on RI.
It can be interpreted as: "I prefer any media type, but send me if it is the
best available after an 80% mark-down in quality".
This is a multi-part message in MIME format.

I find that RI has such a support, but we doesn't.
Is it necessary to follow RI's behaviors on this?


I think our code does not have such a line.

On Mon, Dec 8, 2008 at 8:04 PM, Tim Ellison <t.p.ellison@gmail.com> wrote:

> Kevin Zhou commented on HARMONY-6036:
> > I investigated this problem and found that "Accept" property should
> > be added in
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.createRequest()
> > method.
> >
> > From HTTP/1.1 specification,
> >> "If no Accept header field is present, then it is assumed that
> >> the client accepts all media types".
> >
> > if (reqHeader.get("Accept") == null) { //$NON-NLS-1$
> > output.append("Accept: "text/html, image/gif, image/jpeg, *; "q=.2,
> > */*; q=.2\r\n"); //$NON-NLS-1$ }>
>
> Kevin, can you help me to understand why we would express this set of
> preferences in the Accept header for "/"?
>
> Its unclear to me why, by default, we would have that line?
> (I understand what it does, just not which problem it solves.)
>
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> Thanks,
> Tim
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message