-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
17, 18, 19
A DESCRIPTION OF THE PROBLEM :
When http-response-header end with ' ' (blank), the request will be failed.
In sumbit: https://github.com/openjdk/jdk/commit/1c47244b01dd9e7e176dd91215baef2afbc2626f
File: src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java
In SDK11, line 261: String name = headerString.substring(0, idx).trim();
In SDK17, line 286: String name = headerString.substring(0, idx);
You could see the 'trim()' is removed and this cause a compatible problem.
Line 291: if (!Utils.isValidName(name)) {
Will be failed in this case.
REGRESSION : Last worked in version 11.0.14
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a server side app, which provide an endpoint that respond to any request with an header ('Expires' for example). Add a ' '(blank) after the header name ('Expires ' for example). Send a request to the endpoint.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Normal response. Just like in Chrome or other browser.
ACTUAL -
HTTP client exception.
FREQUENCY : always
When http-response-header end with ' ' (blank), the request will be failed.
In sumbit: https://github.com/openjdk/jdk/commit/1c47244b01dd9e7e176dd91215baef2afbc2626f
File: src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java
In SDK11, line 261: String name = headerString.substring(0, idx).trim();
In SDK17, line 286: String name = headerString.substring(0, idx);
You could see the 'trim()' is removed and this cause a compatible problem.
Line 291: if (!Utils.isValidName(name)) {
Will be failed in this case.
REGRESSION : Last worked in version 11.0.14
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a server side app, which provide an endpoint that respond to any request with an header ('Expires' for example). Add a ' '(blank) after the header name ('Expires ' for example). Send a request to the endpoint.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Normal response. Just like in Chrome or other browser.
ACTUAL -
HTTP client exception.
FREQUENCY : always
- relates to
-
JDK-8255244 HttpClient: Response headers contain incorrectly encoded Unicode characters
- Closed