HTTP Transfer-Encoding and Requests

the HTTP specification states that the Transfer-Encoding header is allowed for requests, but what error code should the server respond to if it does not understand that this Transfer-Encoding is.

As far as I know, the HTTP standard does not cover this feature, but maybe I just did not pay attention to it.

+3
source share
6 answers

An unknown transfer encoding should result in an HTTP 501 "NOT IMPLEMENTED" error. What Apache does, at least.

Also see http://argray.com/unixfaq/httpd_error_codes.shtml

: RFC: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2

+4

, , HTTP WG.

: . :

3.6 RFC 2616:

, - 501 ( ) .

, .

+3

.

, 5xx , - . , , 4xx , , . , 4xx, , .

+1

Transfer-Encoding HTTP . 400 Bad Request.

0

, , 501, RFC-2616 , .

, , , 411 Length Required - Content-Length Transfer-Encoding , .

0

The RFC is a bit unclear, but IMHO it should be 406 invalid .

-1
source

Source: https://habr.com/ru/post/1705503/


All Articles