From e2c49e8abf7e7d0204bcce84919cd49795da4290 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 1 Jun 2015 14:50:06 -0400 Subject: Fix provisioning.cgi to work with haserl-0.9.33 and later --- cgi-bin/provisioning.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3