From: Andrew Lewis Date: Thu, 15 May 2025 09:09:19 +0000 (+0200) Subject: [Minor] Update API docs RE: multiple HTTP headers X-Git-Tag: 3.12.0~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5468%2Fhead;p=thirdparty%2Frspamd.git [Minor] Update API docs RE: multiple HTTP headers --- diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 7e9e7b1df7..36975c8c23 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -41,7 +41,7 @@ local function symbol_callback(task) url='http://example.com/data', body=task:get_content(), callback=http_callback, - headers={Header='Value', OtherHeader='Value'}, + headers={Header='Value', OtherHeader='Value', DuplicatedHeader={'Multiple', 'Values'}}, mime_type='text/plain', }) end @@ -602,7 +602,7 @@ lua_http_push_headers(lua_State *L, struct rspamd_http_message *msg) * @param {string} url specifies URL for a request in the standard URI form (e.g. 'http://example.com/path') * @param {function} callback specifies callback function in format `function (err_message, code, body, headers)` that is called on HTTP request completion. if this parameter is missing, the function performs "pseudo-synchronous" call (see [Synchronous and Asynchronous API overview](/doc/developers/sync_async.html#API-example-http-module) * @param {task} task if called from symbol handler it is generally a good idea to use the common task objects: event base, DNS resolver and events session - * @param {table} headers optional headers in form `[name='value', name='value']` + * @param {table} headers optional headers in form `[name='value']` or `[name=['value1', 'value2']]` to duplicate a header with multiple values * @param {string} mime_type MIME type of the HTTP content (for example, `text/html`) * @param {string/text} body full body content, can be opaque `rspamd{text}` to avoid data copying * @param {number} timeout floating point request timeout value in seconds (default is 5.0 seconds)