-
Notifications
You must be signed in to change notification settings - Fork 38k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SimpleClientHttpRequestFactory: headers with null values should be sent as empty Strings [SPR-13225] #17816
Comments
Stéphane Nicoll commented I can see that a For the record Since both requests are processed successfully for me, can you please clarify what you consider to be a bug? |
Anatoly Deyneka commented headers are sent with SimpleClientHttpRequestFactory. As you see there is no colon for the header with null value. It's processed in tomcat-server but rejected by HAProxy. |
Stéphane Nicoll commented The only thing I can think of would be to translate |
Anatoly Deyneka commented Yes, it will fix the problem. I would expect fix here: for (String headerValue : entry.getValue()) {
connection.addRequestProperty(headerName, headerValue == null ? "" : headerValue);
} |
Stéphane Nicoll commented Done in master. Could you please give it a try against the next |
Anatoly Deyneka opened SPR-13225 and commented
RestTemplate+SimpleClientHttpRequestFactory:
All headers with null values are sent without colon.
Such requests are rejected by HAProxy(<BADREQ>).
BTW it's correctly processed in HttpComponentsClientHttpRequestFactory
Affects: 4.1.6
Issue Links:
Referenced from: commits de6bbe7
The text was updated successfully, but these errors were encountered: