summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-12 11:10:40 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-12 11:10:40 +0000
commitce64a8e630952766ba1c722197f2c954af63b349 (patch)
tree18971c92207cb99da729e76b89017902aad65581 /lib
parent941d102f678e198bf1c74cfb3a757dfb1b95f9f5 (diff)
downloadgitano-ce64a8e630952766ba1c722197f2c954af63b349.tar.gz
fixes HTTP action POST content-type defaulting
Correct the default expression for content-type in POST actions from application/octet-stream to "application/octet-stream" which is less likely to cause a nil/nil-nil type evaluation.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitano/actions.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitano/actions.lua b/lib/gitano/actions.lua
index 0532141..8568d72 100644
--- a/lib/gitano/actions.lua
+++ b/lib/gitano/actions.lua
@@ -84,7 +84,7 @@ local function _curl_txn(url, headers, body, content_type)
return "500", "headers must be a table if provided", {} , ""
end
if method == "POST" then
- headers["Content-Type"] = content_type or application/octet-stream
+ headers["Content-Type"] = content_type or "application/octet-stream"
headers["Content-Length"] = tostring(#body)
args[#args+1] = "--data-binary"
args[#args+1] = "@-"