diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-02-12 11:10:40 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-02-12 11:10:40 +0000 |
commit | ce64a8e630952766ba1c722197f2c954af63b349 (patch) | |
tree | 18971c92207cb99da729e76b89017902aad65581 | |
parent | 941d102f678e198bf1c74cfb3a757dfb1b95f9f5 (diff) | |
download | gitano-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.
-rw-r--r-- | lib/gitano/actions.lua | 2 |
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] = "@-" |