RFR: 8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC [v2]
Daniel Jeliński
djelinski at openjdk.java.net
Mon Jan 24 17:33:12 UTC 2022
On Mon, 24 Jan 2022 15:21:44 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java line 293:
>>
>>> 291: static final String acceptString =
>>> 292: "text/html, image/gif, image/jpeg, */*; q=0.2";
>>> 293:
>>
>> It looks syntactically correct now, but I wonder about the actual semantics, and whether it makes any sense to be asking for 80% reduction in quality of other media types.
>
> Should we just have `static final String acceptString = "*/*";`
yeah, that's a sensible default. `curl` is using that today. I'll adjust.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7181
More information about the net-dev
mailing list