Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Transfer-Encoding and requests

the HTTP specification states that the Transfer-Encoding header is allowed for requests - but what error code should a server respond if it doesn't understand that given Transfer-Encoding.

As far as I know the HTTP standard doesn't cover this possibility, but maybe I have just overlooked it.

like image 506
Fionn Avatar asked Mar 28 '09 15:03

Fionn


2 Answers

An unknown transfer-encoding should raise a HTTP error 501 "NOT IMPLEMENTED". That's what Apache does, at least.

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

Edit: pointer to the corresponding RFC section: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2

like image 98
ChristopheD Avatar answered Oct 11 '22 09:10

ChristopheD


I agree that the answer to this is non-obvious, and have followed up on the HTTP WG's mailing list.

UPDATE: Björn H. rightfully points out:

Section 3.6 of RFC 2616:

A server which receives an entity-body with a transfer-coding it does not understand SHOULD return 501 (Unimplemented), and close the
connection.

So it does address this already.

like image 32
Julian Reschke Avatar answered Oct 11 '22 08:10

Julian Reschke