diff options
author | Steven Barth <steven@midlink.org> | 2009-03-02 19:41:32 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-03-02 19:41:32 +0000 |
commit | 62a914555e2c037babb939553b8f819bb194c1e9 (patch) | |
tree | 700228525658778c7518de9c84a0908b607c96f5 /libs/httpclient/luasrc | |
parent | 33fe5b57d76b287bad42de085e63fe2130ba2be3 (diff) |
httpclient: default content-type for post data is
"application/x-www-form-urlencoded"
Diffstat (limited to 'libs/httpclient/luasrc')
-rw-r--r-- | libs/httpclient/luasrc/httpclient.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/httpclient/luasrc/httpclient.lua b/libs/httpclient/luasrc/httpclient.lua index 767a02ea20..e1b4f83b79 100644 --- a/libs/httpclient/luasrc/httpclient.lua +++ b/libs/httpclient/luasrc/httpclient.lua @@ -152,12 +152,12 @@ function request_raw(uri, options) if type(options.body) == "table" then options.body = http.urlencode_params(options.body) - headers["Content-Type"] = headers["Content-Type"] or - "application/x-www-form-urlencoded" end if type(options.body) == "string" then headers["Content-Length"] = headers["Content-Length"] or #options.body + headers["Content-Type"] = headers["Content-Type"] or + "application/x-www-form-urlencoded" end -- Assemble message |