summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/http/protocol.luadoc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-18 16:11:42 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-18 16:21:27 +0200
commiteb4571c6dc7e9f99133de1d7df23024ba6d31d9e (patch)
tree105b7a817dd99fc6a520006668e5cae5377070fd /modules/luci-base/luasrc/http/protocol.luadoc
parent8f66de12c190952e23e6d7c41a52b2868c203beb (diff)
luci-base: fold luci.http.protocol into luci.http
With only the decoder routines remaining in luci.http.protocol, it makes no sense to keep the low level protocol class around, so fold the remaining code into the central luci.http class. Also adjust the few direct users of luci.http.protocol accordingly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/http/protocol.luadoc')
-rw-r--r--modules/luci-base/luasrc/http/protocol.luadoc99
1 files changed, 0 insertions, 99 deletions
diff --git a/modules/luci-base/luasrc/http/protocol.luadoc b/modules/luci-base/luasrc/http/protocol.luadoc
deleted file mode 100644
index 0c9ff6fa4c..0000000000
--- a/modules/luci-base/luasrc/http/protocol.luadoc
+++ /dev/null
@@ -1,99 +0,0 @@
----[[
-LuCI http protocol class.
-
-This class contains several functions useful for http message- and content
-decoding and to retrive form data from raw http messages.
-]]
-module "luci.http.protocol"
-
----[[
-Extract and split urlencoded data pairs, separated bei either "&" or ";"
-from given url or string. Returns a table with urldecoded values.
-
-Simple parameters are stored as string values associated with the parameter
-name within the table. Parameters with multiple values are stored as array
-containing the corresponding values.
-
-@class function
-@name urldecode_params
-@param url The url or string which contains x-www-urlencoded form data
-@param tbl Use the given table for storing values (optional)
-@return Table containing the urldecoded parameters
-@see urlencode_params
-]]
-
----[[
-Encode each key-value-pair in given table to x-www-urlencoded format,
-separated by "&".
-
-Tables are encoded as parameters with multiple values by repeating the
-parameter name with each value.
-
-@class function
-@name urlencode_params
-@param tbl Table with the values
-@return String containing encoded values
-@see urldecode_params
-]]
-
----[[
-Decode a mime encoded http message body with multipart/form-data Content-Type.
-
-Stores all extracted data associated with its parameter name
-in the params table within the given message object. Multiple parameter
-values are stored as tables, ordinary ones as strings.
-
-If an optional file callback function is given then it is feeded with the
-file contents chunk by chunk and only the extracted file name is stored
-within the params table. The callback function will be called subsequently
-with three arguments:
- o Table containing decoded (name, file) and raw (headers) mime header data
- o String value containing a chunk of the file data
- o Boolean which indicates wheather the current chunk is the last one (eof)
-
-@class function
-@name mimedecode_message_body
-@param src Ltn12 source function
-@param msg HTTP message object
-@param filecb File callback function (optional)
-@return Value indicating successful operation (not nil means "ok")
-@return String containing the error if unsuccessful
-@see parse_message_header
-]]
-
----[[
-Decode an urlencoded http message body with application/x-www-urlencoded
-Content-Type.
-
-Stores all extracted data associated with its parameter name in the params
-table within the given message object. Multiple parameter values are stored
-as tables, ordinary ones as strings.
-
-@class function
-@name urldecode_message_body
-@param src Ltn12 source function
-@param msg HTTP message object
-@return Value indicating successful operation (not nil means "ok")
-@return String containing the error if unsuccessful
-@see parse_message_header
-]]
-
----[[
-Try to extract and decode a http message body from the given ltn12 source.
-This function will examine the Content-Type within the given message object
-to select the appropriate content decoder.
-
-Currently the application/x-www-urlencoded and application/form-data
-mime types are supported. If the encountered content encoding can't be
-handled then the whole message body will be stored unaltered as "content"
-property within the given message object.
-
-@class function
-@name parse_message_body
-@param src Ltn12 source function
-@param msg HTTP message object
-@param filecb File data callback (optional, see mimedecode_message_body())
-@return Value indicating successful operation (not nil means "ok")
-@return String containing the error if unsuccessful
-@see parse_message_header
-]]