projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
httpclient: default content-type for post data is
[project/luci.git]
/
libs
/
httpclient
/
luasrc
/
httpclient.lua
diff --git
a/libs/httpclient/luasrc/httpclient.lua
b/libs/httpclient/luasrc/httpclient.lua
index
767a02e
..
e1b4f83
100644
(file)
--- 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)
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
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
end
-- Assemble message