You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expected:<foo=ba[z]> but was:<foo=ba[r]>
org.junit.ComparisonFailure: expected:<foo=ba[z]> but was:<foo=ba[r]>
at org.junit.Assert.assertEquals(Assert.java:117)
at org.junit.Assert.assertEquals(Assert.java:146)
at org.eclipse.equinox.http.servlet.tests.DispatchingTest.test_headers_forward(DispatchingTest.java:1411)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
I can reproduce it locally, it fails only with Java 18.
The response object contains both cookies from first and second servlet, and the expected one is now on the second place: Set-Cookie=[foo=bar, foo=baz].
@tjwatson : I have no clue who generates the response, but the order is wrong on Java 18.
The text was updated successfully, but these errors were encountered:
tjwatson
transferred this issue from eclipse-equinox/equinox.framework
Apr 5, 2022
The issue is what appears to be a change in how java.net.URLConnection.getHeaderFields() behaves. In < Java 18 the header list gets reversed. The source leads to the method
sun.net.www.MessageHeader.filterAndAddHeaders
In < Java 18 this did a reverse list processing of the keys, now it does a forward list processing. The result is the value list is in the reverse order that it has been for all < Java 18 versions.
I'm not sure why they changed this order here (intentional or not).
https://download.eclipse.org/eclipse/downloads/drops4/I20220404-1800/testresults/html/org.eclipse.equinox.http.servlet.tests_ep424I-unit-cen64-gtk3-java18_linux.gtk.x86_64_18.html
I can reproduce it locally, it fails only with Java 18.
The response object contains both cookies from first and second servlet, and the expected one is now on the second place:
Set-Cookie=[foo=bar, foo=baz]
.@tjwatson : I have no clue who generates the response, but the order is wrong on Java 18.
The text was updated successfully, but these errors were encountered: