projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33fe5b5
)
httpclient: default content-type for post data is
author
Steven Barth
<steven@midlink.org>
Mon, 2 Mar 2009 19:41:32 +0000
(19:41 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 2 Mar 2009 19:41:32 +0000
(19:41 +0000)
"application/x-www-form-urlencoded"
libs/httpclient/luasrc/httpclient.lua
patch
|
blob
|
history
diff --git
a/libs/httpclient/luasrc/httpclient.lua
b/libs/httpclient/luasrc/httpclient.lua
index 767a02ea20cd7bef805958c7d4e6262b4d332e58..e1b4f83b79bc4e214f040e593aa42c02430d298b 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)
- 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