diff options
author | Julian Squires <julian@cipht.net> | 2020-10-16 12:18:46 -0230 |
---|---|---|
committer | Thijs <thijs@thijsschreijer.nl> | 2022-03-22 09:38:14 +0100 |
commit | 2a76cb906cb955a83ed76b8e47cc76c77ce8e15f (patch) | |
tree | c7d224fba05b39146f44bcebca62036928df50a5 /FIX | |
parent | e178b1e0183ba07290145be3ec718cd78ad826cc (diff) | |
download | luasocket-2a76cb906cb955a83ed76b8e47cc76c77ce8e15f.tar.gz luasocket-2a76cb906cb955a83ed76b8e47cc76c77ce8e15f.tar.bz2 luasocket-2a76cb906cb955a83ed76b8e47cc76c77ce8e15f.zip |
http.lua: set transfer-encoding if source and no content-length
If a source is specified without a content-length header, LuaSocket
sends the data in the chunked transfer coding; however, it doesn't set
the transfer-encoding header. While I recognize that the user can set
this manually, this is a gotcha that has caught me multiple times.
RFC7230, section 3.3.3
(https://tools.ietf.org/html/rfc7230#section-3.3.3)
is clear about this; if neither content-length nor transfer-encoding
chunked are specified, the request message body length is zero. While
some servers may ignore this, I have encountered several that follow
the RFC in this regard, most recently golang's net/http.
Diffstat (limited to 'FIX')
0 files changed, 0 insertions, 0 deletions