]> git.ipfire.org Git - thirdparty/asterisk.git/commit
http: Properly reject requests with Transfer-Encoding set
authorDavid M. Lee <dlee@digium.com>
Tue, 24 Dec 2013 16:41:36 +0000 (16:41 +0000)
committerDavid M. Lee <dlee@digium.com>
Tue, 24 Dec 2013 16:41:36 +0000 (16:41 +0000)
commitc14689225dc21fd9665e34f1c027d064d7d304bf
tree1c35999166fab1dcf58dfbf6ac56d470896da3d6
parent176c3a143b589a8a6e150147c56c1bff348e7021
http: Properly reject requests with Transfer-Encoding set

Asterisk does not support any of the transfer encodings specified in
HTTP/1.1, other than the default "identity" encoding.

According to 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. A server MUST NOT send transfer-codings to an HTTP/1.0
   client.

This patch adds the 501 Unimplemented response, instead of the hard work
of actually implementing other recordings.

This behavior is especially problematic for Node.js clients, which use
chunked encoding by default.

(closes issue ASTERISK-22486)
Review: https://reviewboard.asterisk.org/r/3092/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/http.c