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
A server MUST NOT send a Content-Length header field in any response
with a status code of 1xx (Informational) or 204 (No Content). A
server MUST NOT send a Content-Length header field in any 2xx
(Successful) response to a CONNECT request
Actual behavior
netty is adding content-length=0 header in 204 response
Steps to reproduce
Run a http request/response with response code 204.
Minimal yet complete reproducer code (or URL to code)
@Override
@RequestMapping("/**")
public ResponseEntity<?> handleReq(RequestEntity<byte[]> reqEntity,
@RequestHeader HttpHeaders reqHeaders) {
HttpHeaders responseHeaderMap = new HttpHeaders();
responseHeaderMap.set("abc11", "xyz11");
responseHeaderMap.set("abc12", "xyz12");
responseHeaderMap.set("abc13", "xyz13");
responseHeaderMap.set("abc14", "xyz14");
return (new ResponseEntity<byte[]>(responseHeaderMap, HttpStatus.NO_CONTENT));
}
Netty version
4.1.82
JVM version (e.g. java -version)
jdk:17.0.5
OS version (e.g. uname -a)
Linux 4.14.35-1818.3.3.el7uek.x86_64
The text was updated successfully, but these errors were encountered:
Expected behavior
A server MUST NOT send a Content-Length header field in any response
with a status code of 1xx (Informational) or 204 (No Content). A
server MUST NOT send a Content-Length header field in any 2xx
(Successful) response to a CONNECT request
Actual behavior
netty is adding content-length=0 header in 204 response
Steps to reproduce
Run a http request/response with response code 204.
Minimal yet complete reproducer code (or URL to code)
Netty version
4.1.82
JVM version (e.g.
java -version
)jdk:17.0.5
OS version (e.g.
uname -a
)Linux 4.14.35-1818.3.3.el7uek.x86_64
The text was updated successfully, but these errors were encountered: