URLConnection.guessContentTypeFromStream() does not support UTF8 and UTF32 with BOM
chris.hegarty at oracle.com
Mon Mar 7 05:56:59 PST 2011
I think Alan mentioned it in an earlier mail, this is a legacy API and
not widely used. I can't say I've come across its use more than a
handful of times in more than 10 years.
If you have a small patch that resolves a particular issue then maybe we
should just proceed with getting it in.
On 07/03/2011 06:57, Charles Lee wrote:
> On 03/04/2011 07:13 PM, Alan Bateman wrote:
>> Charles Lee wrote:
>>> Hi Alan,
>>> Sorry for the late reply. This test case comes from a big test case,
>>> which test more types of stream.
>> A test for this method should pass if "null" is returned as the method
>> does not specify the content types that it recognizes. I think it's
>> okay to extend it as you are proposing but I don't think anyone can
>> really rely on it. I'm happy to create an request-for-feature (RFE) in
>> the bug database for this and help you get it in if you want to pursue it.
> Thanks Alan. I am so confused the hard-coding in that method. It shows
> it can only detect the a small range of type. Should some comment add on
> the spec, such as "can not be relied"?
More information about the net-dev