harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib] [luni] HttpURLConnection does not have the "Accept" header (HARMONY-6036)
Date Mon, 08 Dec 2008 12:04:04 GMT
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


View raw message