diff options
-rwxr-xr-x | cgi-bin/provisioning.cgi | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cgi-bin/provisioning.cgi b/cgi-bin/provisioning.cgi index 6cc53c9..ae4255c 100755 --- a/cgi-bin/provisioning.cgi +++ b/cgi-bin/provisioning.cgi @@ -138,7 +138,12 @@ if ( request_method == "GET" ) then APP:dispatch("/provisioning/", "provisioning", "getfile", clientdata) APP:destroy() elseif ( request_method == "PUT" ) then - local data = io.stdin:read("*all") + local data + if POST and POST.body and POST.body ~= "" then + data = POST.body + else + data = io.stdin:read("*all") + end local success = true -- Protect against writing to arbitrary paths |