From 0549b1e5a8a3132005e275d6026db8003cb067d2 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 26 Oct 2021 11:32:46 +0800 Subject: *rename folder --- .../Libraries/json4lua/doc/cgilua_patch.html | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 Data/DefaultContent/Libraries/json4lua/doc/cgilua_patch.html (limited to 'Data/DefaultContent/Libraries/json4lua/doc/cgilua_patch.html') diff --git a/Data/DefaultContent/Libraries/json4lua/doc/cgilua_patch.html b/Data/DefaultContent/Libraries/json4lua/doc/cgilua_patch.html new file mode 100644 index 0000000..1b4d6b3 --- /dev/null +++ b/Data/DefaultContent/Libraries/json4lua/doc/cgilua_patch.html @@ -0,0 +1,187 @@ + + +JSON4Lua and JSONRPC4Lua + + + + + + + + + + + +
+

+ + +

+ + + + + + + +
+
Patching CGILua to handle text/plain
+ + +JSON RPC (both the JSONRPC4Lua implementation and the jsolait Javascript implementation) send the http request with a Content-Type of text/plain.

+ +CGILua 5.0 does not accept text/plain content, and will generate an error of 'Unsupported Media Type: text/plain'.

+ +This is easily patched in CGILua 5.0 by making the following change to cgilua/post.lua, line 286:

+Change:

+	elseif strfind (contenttype, "text/xml") then
+
+to +
+	elseif strfind (contenttype, "text/xml") or strfind (contenttype, "text/plain") then
+
+This makes CGILua handle text/plain as it does text/xml, without parsing the incoming POST data.

+ +Please note: I have requested the maintainers of CGILua to make this change to CGILua, whereafter this patch will no longer be required. + + +

+ + \ No newline at end of file -- cgit v1.1-26-g67d0