moonbridge
changeset 236:5f2a2f73e9d3
Fixed bug in regard to empty POST bodies
author | jbe |
---|---|
date | Tue Jul 26 16:22:21 2016 +0200 (2016-07-26) |
parents | 6bcdddff1ddd |
children | 1fd00eed96ee 73d832c4a9b5 |
files | moonbridge_http.lua |
line diff
1.1 --- a/moonbridge_http.lua Sat Jan 16 04:37:53 2016 +0100 1.2 +++ b/moonbridge_http.lua Tue Jul 26 16:22:21 2016 +0200 1.3 @@ -1134,6 +1134,7 @@ 1.4 local proper_value = tostring(request_body_content_length) 1.5 for i, value in ipairs(values) do 1.6 value = string.match(value, "^0*(.*)") 1.7 + if value == "" then value = "0" end 1.8 if value ~= proper_value then 1.9 return request_error(false, "400 Bad Request", "Content-Length header(s) invalid") 1.10 end