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
[...] or null if the {@code Content-Type} header must not be set
but then HttpConnection.normalizeRequest contains this code:
if (!headers.contains(HttpHeader.CONTENT_TYPE))
{
String contentType = content.getContentType();
if (contentType == null)
contentType = getHttpClient().getDefaultRequestContentType();
if (contentType != null)
request.addHeader(new HttpField(HttpHeader.CONTENT_TYPE, contentType));
}
Meaning, if content.getContentType() returns null, then getHttpClient().getDefaultRequestContentType() is used. Only if the latter is also null is the content-type left unset.
Please ensure that the documentation and implementation match in this case.
The text was updated successfully, but these errors were encountered:
Jetty version(s)
12.0.15
Jetty Environment
N/A
Java version/vendor
(use: java -version)
N/A
OS type/version
N/A
Description
Request.Content.getContentType()'s Javadoc reads:
but then
HttpConnection.normalizeRequest
contains this code:Meaning, if
content.getContentType()
returns null, thengetHttpClient().getDefaultRequestContentType()
is used. Only if the latter is also null is the content-type left unset.Please ensure that the documentation and implementation match in this case.
The text was updated successfully, but these errors were encountered: