vert.x
vert.x copied to clipboard
RFC7230 compliance
It would be nice for Vertx HTTP Server to comply with RFC7230 in the following aspects:
- A server MUST NOT send a Transfer-Encoding header field in any response with a status code of 1xx (Informational) or 204 (No Content).
- A server MUST NOT send a Transfer-Encoding header field in any 2xx (Successful) response to a CONNECT request
- 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 (Section 4.3.6 of [RFC7231]).
- Any response to a HEAD request and any response with a 1xx (Informational), 204 (No Content), or 304 (Not Modified) status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body.
when such cases happen and there is an attempt to write those headers or the data down, I think the request should fail to avoid unintentional breaking of the HTTP protocol