RFR 8133686: REOPEN JDK-8080659 : HttpURLConnection?s getHeaderFields method returns field values in reverse order

Daniel Fuchs daniel.fuchs at oracle.com
Thu Aug 27 19:00:39 UTC 2020


Hi Evan,

Actually - I believe you are still missing a test that verifies
the actual issue - that is:

If a multi valued field is sent over the wire as a repeated
list of headers - that is - if it is transmitted as:

foo: foo1
foo: foo2
foo: foo3

then you need to verify that HttpURLConnection.getHeaderFields().get("foo")
will now return [foo1, foo2, foo3] and not [foo3, foo2, foo1].

Also I notice that your change also fixes 
URLConnection::getRequestProperties(),
directly implemented in URLConnection, which is both good and bad.

Good because the previous behavior was IMO a bug. Bad because it
slightly increases the chances of regression (from minimal to low).
So I now believe that writing a CSR is indeed required, to raise
the awareness on this behavior change.

best regards,

-- daniel

On 20/08/2020 17:06, Evan Whelan wrote:
> Hi all,
> 
> A revised webrev for this change can be found at 
> http://cr.openjdk.java.net/~coffeys/evwhelan/8133686/webrev/
> 
> This revision fixes a test that failed as a result of the source change.
> 
> If anyone has any further thoughts on whether this change needs a CSR, I 
> would love to hear them.
> 
> Thanks in advance,
> 
> Evan


More information about the net-dev mailing list