Apache HTTPD
Macros | Typedefs | Functions | Variables
lua_request.c File Reference
module lua_module
#include "mod_lua.h"
#include "lua_apr.h"
#include "lua_dbd.h"
#include "lua_passwd.h"
#include "scoreboard.h"
#include "util_md5.h"
#include "util_script.h"
#include "util_varbuf.h"
#include "apr_date.h"
#include "apr_pools.h"
#include "apr_thread_mutex.h"
#include "apr_tables.h"
#include "util_cookies.h"
#include "apr_want.h"

Go to the source code of this file.

Macros

#define APR_WANT_BYTEFUNC
 
#define POST_MAX_VARS   500
 
#define MODLUA_MAX_REG_MATCH   25
 
#define APLUA_REQ_TRACE(lev)
 

Typedefs

typedef char *(* req_field_string_f) (request_rec *r)
 
typedef int(* req_field_int_f) (request_rec *r)
 
typedef req_table_t *(* req_field_apr_table_f) (request_rec *r)
 

Functions

void ap_lua_rstack_dump (lua_State *L, request_rec *r, const char *msg)
 
static request_recap_lua_check_request_rec (lua_State *L, int index)
 
static int req_aprtable2luatable_cb (void *l, const char *key, const char *value)
 
static int req_aprtable2luatable_cb_len (void *l, const char *key, const char *value, size_t len)
 
static int lua_read_body (request_rec *r, const char **rbuf, apr_off_t *size, apr_off_t maxsize)
 
static apr_status_t lua_write_body (request_rec *r, apr_file_t *file, apr_off_t *size)
 
static int req_aprtable2luatable (lua_State *L, apr_table_t *t)
 
static int req_headers_in_table (lua_State *L)
 
static int req_headers_out_table (lua_State *L)
 
static int req_err_headers_out_table (lua_State *L)
 
static int req_notes_table (lua_State *L)
 
static int req_subprocess_env_table (lua_State *L)
 
static int req_parseargs (lua_State *L)
 
static charap_lua_binstrstr (const char *haystack, size_t hsize, const char *needle, size_t nsize)
 
static int req_parsebody (lua_State *L)
 
static int lua_ap_requestbody (lua_State *L)
 
static int req_puts (lua_State *L)
 
static int req_write (lua_State *L)
 
static int req_add_output_filter (lua_State *L)
 
static int req_construct_url (lua_State *L)
 
static int req_escape_html (lua_State *L)
 
static int req_ssl_var_lookup (lua_State *L)
 
static const charreq_document_root (request_rec *r)
 
static const charreq_context_prefix (request_rec *r)
 
static const charreq_context_document_root (request_rec *r)
 
static charreq_uri_field (request_rec *r)
 
static const charreq_method_field (request_rec *r)
 
static const charreq_handler_field (request_rec *r)
 
static const charreq_proxyreq_field (request_rec *r)
 
static const charreq_hostname_field (request_rec *r)
 
static const charreq_args_field (request_rec *r)
 
static const charreq_path_info_field (request_rec *r)
 
static const charreq_canonical_filename_field (request_rec *r)
 
static const charreq_filename_field (request_rec *r)
 
static const charreq_user_field (request_rec *r)
 
static const charreq_unparsed_uri_field (request_rec *r)
 
static const charreq_ap_auth_type_field (request_rec *r)
 
static const charreq_content_encoding_field (request_rec *r)
 
static const charreq_content_type_field (request_rec *r)
 
static const charreq_range_field (request_rec *r)
 
static const charreq_protocol_field (request_rec *r)
 
static const charreq_the_request_field (request_rec *r)
 
static const charreq_log_id_field (request_rec *r)
 
static const charreq_useragent_ip_field (request_rec *r)
 
static int req_remaining_field (request_rec *r)
 
static int req_status_field (request_rec *r)
 
static int req_assbackwards_field (request_rec *r)
 
static req_table_treq_headers_in (request_rec *r)
 
static req_table_treq_headers_out (request_rec *r)
 
static req_table_treq_err_headers_out (request_rec *r)
 
static req_table_treq_subprocess_env (request_rec *r)
 
static req_table_treq_notes (request_rec *r)
 
static int req_ssl_is_https_field (request_rec *r)
 
static int req_ap_get_server_port (request_rec *r)
 
static int lua_ap_rflush (lua_State *L)
 
static const charlua_ap_options (request_rec *r)
 
static const charlua_ap_allowoverrides (request_rec *r)
 
static int lua_ap_started (request_rec *r)
 
static const charlua_ap_basic_auth_pw (request_rec *r)
 
static int lua_ap_limit_req_body (request_rec *r)
 
static int lua_ap_is_initial_req (request_rec *r)
 
static int lua_ap_some_auth_required (request_rec *r)
 
static int lua_ap_sendfile (lua_State *L)
 
static int lua_apr_b64encode (lua_State *L)
 
static int lua_apr_b64decode (lua_State *L)
 
static int lua_ap_unescape (lua_State *L)
 
static int lua_ap_escape (lua_State *L)
 
static int lua_apr_md5 (lua_State *L)
 
static int lua_apr_sha1 (lua_State *L)
 
static int lua_apr_htpassword (lua_State *L)
 
static int lua_apr_touch (lua_State *L)
 
static int lua_apr_mkdir (lua_State *L)
 
static int lua_apr_mkrdir (lua_State *L)
 
static int lua_apr_rmdir (lua_State *L)
 
static int lua_apr_date_parse_rfc (lua_State *L)
 
static int lua_ap_mpm_query (lua_State *L)
 
static int lua_ap_expr (lua_State *L)
 
static int lua_ap_regex (lua_State *L)
 
static int lua_ap_scoreboard_process (lua_State *L)
 
static int lua_ap_scoreboard_worker (lua_State *L)
 
static int lua_ap_clock (lua_State *L)
 
static int lua_ap_add_input_filter (lua_State *L)
 
static int lua_ap_module_info (lua_State *L)
 
static int lua_ap_runtime_dir_relative (lua_State *L)
 
static int lua_ap_set_document_root (lua_State *L)
 
static int lua_ap_getdir (lua_State *L)
 
static int lua_ap_stat (lua_State *L)
 
static int lua_ap_loaded_modules (lua_State *L)
 
static int lua_ap_server_info (lua_State *L)
 
static int lua_ap_set_context_info (lua_State *L)
 
static int lua_ap_os_escape_path (lua_State *L)
 
static int lua_ap_escape_logitem (lua_State *L)
 
static int lua_ap_strcmp_match (lua_State *L)
 
static int lua_ap_set_keepalive (lua_State *L)
 
static int lua_ap_make_etag (lua_State *L)
 
static int lua_ap_send_interim_response (lua_State *L)
 
static int lua_ap_custom_response (lua_State *L)
 
static int lua_ap_exists_config_define (lua_State *L)
 
static int lua_ap_get_server_name_for_url (lua_State *L)
 
static int lua_ap_state_query (lua_State *L)
 
static int lua_ap_usleep (lua_State *L)
 
static int req_dispatch (lua_State *L)
 
static int req_log_at (lua_State *L, int level)
 
static int req_emerg (lua_State *L)
 
static int req_alert (lua_State *L)
 
static int req_crit (lua_State *L)
 
static int req_err (lua_State *L)
 
static int req_warn (lua_State *L)
 
static int req_notice (lua_State *L)
 
static int req_info (lua_State *L)
 
static int req_debug (lua_State *L)
 
static int lua_ivm_get (lua_State *L)
 
static int lua_ivm_set (lua_State *L)
 
static int lua_get_cookie (lua_State *L)
 
static int lua_set_cookie (lua_State *L)
 
static apr_uint64_t ap_ntoh64 (const apr_uint64_t *input)
 
static int lua_websocket_greet (lua_State *L)
 
static apr_status_t lua_websocket_readbytes (conn_rec *c, apr_bucket_brigade *brigade, char *buffer, apr_off_t len)
 
static int lua_websocket_peek (lua_State *L)
 
static int lua_websocket_read (lua_State *L)
 
static int lua_websocket_write (lua_State *L)
 
static int lua_websocket_close (lua_State *L)
 
static int lua_websocket_ping (lua_State *L)
 
static int req_trace1 (lua_State *L)
 
static int req_trace2 (lua_State *L)
 
static int req_trace3 (lua_State *L)
 
static int req_trace4 (lua_State *L)
 
static int req_trace5 (lua_State *L)
 
static int req_trace6 (lua_State *L)
 
static int req_trace7 (lua_State *L)
 
static int req_trace8 (lua_State *L)
 
static int req_newindex (lua_State *L)
 
static void read_cfg_tree (lua_State *L, request_rec *r, ap_directive_t *rcfg)
 
static int lua_ap_get_config (lua_State *L)
 
static int lua_ap_get_active_config (lua_State *L)
 
static const charlua_ap_auth_name (request_rec *r)
 
static const charlua_ap_get_server_name (request_rec *r)
 
static req_fun_tmakefun (const void *fun, int type, apr_pool_t *pool)
 
void ap_lua_load_request_lmodule (lua_State *L, apr_pool_t *p)
 
void ap_lua_push_connection (lua_State *L, conn_rec *c)
 
void ap_lua_push_server (lua_State *L, server_rec *s)
 
void ap_lua_push_request (lua_State *L, request_rec *r)
 

Variables

apr_global_mutex_tlua_ivm_mutex
 
apr_shm_tlua_ivm_shm
 
static int *const aplog_module_index = &( lua_module.module_index)
 
static const struct luaL_Reg request_methods []
 
static const struct luaL_Reg connection_methods []
 
static const struct luaL_Reg server_methods []
 

Macro Definition Documentation

◆ APLUA_REQ_TRACE

#define APLUA_REQ_TRACE (   lev)
Value:
static int req_trace##lev(lua_State *L) \
{ \
return req_log_at(L, APLOG_TRACE##lev); \
}
apr_size_t size
static int req_log_at(lua_State *L, int level)

Definition at line 2527 of file lua_request.c.

◆ APR_WANT_BYTEFUNC

#define APR_WANT_BYTEFUNC

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 32 of file lua_request.c.

◆ MODLUA_MAX_REG_MATCH

#define MODLUA_MAX_REG_MATCH   25

Definition at line 42 of file lua_request.c.

◆ POST_MAX_VARS

#define POST_MAX_VARS   500

Definition at line 39 of file lua_request.c.

Typedef Documentation

◆ req_field_apr_table_f

typedef req_table_t *(* req_field_apr_table_f) (request_rec *r)

Definition at line 47 of file lua_request.c.

◆ req_field_int_f

typedef int(* req_field_int_f) (request_rec *r)

Definition at line 46 of file lua_request.c.

◆ req_field_string_f

typedef char *(* req_field_string_f) (request_rec *r)

Definition at line 45 of file lua_request.c.

Function Documentation

◆ ap_lua_binstrstr()

static char * ap_lua_binstrstr ( const char haystack,
size_t  hsize,
const char needle,
size_t  nsize 
)
static

Definition at line 365 of file lua_request.c.

◆ ap_lua_check_request_rec()

static request_rec * ap_lua_check_request_rec ( lua_State L,
int  index 
)
static

Verify that the thing at index is a request_rec wrapping userdata thingamajig and return it if it is. if it is not lua will enter its error handling routine.

Definition at line 118 of file lua_request.c.

◆ ap_lua_load_request_lmodule()

void ap_lua_load_request_lmodule ( lua_State L,
apr_pool_t p 
)

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 2715 of file lua_request.c.

◆ ap_lua_push_connection()

void ap_lua_push_connection ( lua_State L,
conn_rec c 
)

Definition at line 3003 of file lua_request.c.

◆ ap_lua_push_request()

void ap_lua_push_request ( lua_State L,
request_rec r 
)

Definition at line 3038 of file lua_request.c.

◆ ap_lua_push_server()

void ap_lua_push_server ( lua_State L,
server_rec s 
)

Definition at line 3025 of file lua_request.c.

◆ ap_lua_rstack_dump()

void ap_lua_rstack_dump ( lua_State L,
request_rec r,
const char msg 
)

make a userdata out of a C pointer, and vice versa instead of using lightuserdata

Definition at line 50 of file lua_request.c.

◆ ap_ntoh64()

static apr_uint64_t ap_ntoh64 ( const apr_uint64_t input)
static

Definition at line 2167 of file lua_request.c.

◆ lua_ap_add_input_filter()

static int lua_ap_add_input_filter ( lua_State L)
static

Definition at line 1398 of file lua_request.c.

◆ lua_ap_allowoverrides()

static const char * lua_ap_allowoverrides ( request_rec r)
static

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride Limit

< *.conf anywhere and .htaccess when AllowOverride Options

< *.conf anywhere and .htaccess when AllowOverride FileInfo

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride AuthConfig

< *.conf anywhere and .htaccess when AllowOverride Indexes

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride Limit

< *.conf anywhere and .htaccess when AllowOverride Options

< *.conf anywhere and .htaccess when AllowOverride FileInfo

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride AuthConfig

< *.conf anywhere and .htaccess when AllowOverride Indexes

< *.conf is not available anywhere in this override

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride Limit

< *.conf anywhere and .htaccess when AllowOverride Options

< *.conf anywhere and .htaccess when AllowOverride FileInfo

< *.conf inside <Directory> or <Location> and .htaccess when AllowOverride AuthConfig

< *.conf anywhere and .htaccess when AllowOverride Indexes

Definition at line 781 of file lua_request.c.

◆ lua_ap_auth_name()

static const char * lua_ap_auth_name ( request_rec r)
static

Definition at line 2685 of file lua_request.c.

◆ lua_ap_basic_auth_pw()

static const char * lua_ap_basic_auth_pw ( request_rec r)
static

Definition at line 800 of file lua_request.c.

◆ lua_ap_clock()

static int lua_ap_clock ( lua_State L)
static

Definition at line 1386 of file lua_request.c.

◆ lua_ap_custom_response()

static int lua_ap_custom_response ( lua_State L)
static

ap_custom_response (request_rec *r, int status, const char *string) Install a custom response handler for a given status

Parameters
rThe current request
statusThe status for which the custom response should be used
stringThe custom response. This can be a static string, a file or a URL

Definition at line 1793 of file lua_request.c.

◆ lua_ap_escape()

static int lua_ap_escape ( lua_State L)
static

Definition at line 934 of file lua_request.c.

◆ lua_ap_escape_logitem()

static int lua_ap_escape_logitem ( lua_State L)
static

ap_escape_logitem (apr_pool_t *p, const char *str) Escape a string for logging

Parameters
pThe pool to allocate from
strThe string to escape
Returns
The escaped string

Definition at line 1681 of file lua_request.c.

◆ lua_ap_exists_config_define()

static int lua_ap_exists_config_define ( lua_State L)
static

ap_exists_config_define (const char *name) Check for a definition from the server command line

Parameters
nameThe define to check for
Returns
1 if defined, 0 otherwise

Definition at line 1815 of file lua_request.c.

◆ lua_ap_expr()

static int lua_ap_expr ( lua_State L)
static

Definition at line 1127 of file lua_request.c.

◆ lua_ap_get_active_config()

static int lua_ap_get_active_config ( lua_State L)
static

Definition at line 2647 of file lua_request.c.

◆ lua_ap_get_config()

static int lua_ap_get_config ( lua_State L)
static

Definition at line 2638 of file lua_request.c.

◆ lua_ap_get_server_name()

static const char * lua_ap_get_server_name ( request_rec r)
static

Definition at line 2692 of file lua_request.c.

◆ lua_ap_get_server_name_for_url()

static int lua_ap_get_server_name_for_url ( lua_State L)
static

Definition at line 1826 of file lua_request.c.

◆ lua_ap_getdir()

static int lua_ap_getdir ( lua_State L)
static

< ->name in proper case

Definition at line 1483 of file lua_request.c.

◆ lua_ap_is_initial_req()

static int lua_ap_is_initial_req ( request_rec r)
static

Definition at line 812 of file lua_request.c.

◆ lua_ap_limit_req_body()

static int lua_ap_limit_req_body ( request_rec r)
static

Definition at line 807 of file lua_request.c.

◆ lua_ap_loaded_modules()

static int lua_ap_loaded_modules ( lua_State L)
static

Definition at line 1577 of file lua_request.c.

◆ lua_ap_make_etag()

static int lua_ap_make_etag ( lua_State L)
static

ap_make_etag (request_rec *r, int force_weak) Construct an entity tag from the resource information. If it's a real file, build in some of the file characteristics.

Parameters
rThe current request
force_weakForce the entity tag to be weak - it could be modified again in as short an interval.
Returns
The entity tag

Definition at line 1750 of file lua_request.c.

◆ lua_ap_module_info()

static int lua_ap_module_info ( lua_State L)
static

Definition at line 1422 of file lua_request.c.

◆ lua_ap_mpm_query()

static int lua_ap_mpm_query ( lua_State L)
static

Definition at line 1113 of file lua_request.c.

◆ lua_ap_options()

static const char * lua_ap_options ( request_rec r)
static

Definition at line 774 of file lua_request.c.

◆ lua_ap_os_escape_path()

static int lua_ap_os_escape_path ( lua_State L)
static

ap_os_escape_path (apr_pool_t *p, const char *path, int partial) convert an OS path to a URL in an OS dependant way.

Parameters
pThe pool to allocate from
pathThe path to convert
partialif set, assume that the path will be appended to something with a '/' in it (and thus does not prefix "./")
Returns
The converted URL

Definition at line 1656 of file lua_request.c.

◆ lua_ap_regex()

static int lua_ap_regex ( lua_State L)
static

Definition at line 1169 of file lua_request.c.

◆ lua_ap_requestbody()

static int lua_ap_requestbody ( lua_State L)
static

< Module has handled this stage.

< Create the file if not there

<

Deprecated:
See also
APR_FOPEN_CREATE

< Open the file for writing

< use OS's default permissions

< Module has handled this stage.

Definition at line 456 of file lua_request.c.

◆ lua_ap_rflush()

static int lua_ap_rflush ( lua_State L)
static

Definition at line 762 of file lua_request.c.

◆ lua_ap_runtime_dir_relative()

static int lua_ap_runtime_dir_relative ( lua_State L)
static

Definition at line 1450 of file lua_request.c.

◆ lua_ap_scoreboard_process()

static int lua_ap_scoreboard_process ( lua_State L)
static

Definition at line 1235 of file lua_request.c.

◆ lua_ap_scoreboard_worker()

static int lua_ap_scoreboard_worker ( lua_State L)
static

Definition at line 1288 of file lua_request.c.

◆ lua_ap_send_interim_response()

static int lua_ap_send_interim_response ( lua_State L)
static

ap_send_interim_response (request_rec *r, int send_headers) Send an interim (HTTP 1xx) response immediately.

Parameters
rThe request
send_headersWhether to send&clear headers in r->headers_out

Definition at line 1772 of file lua_request.c.

◆ lua_ap_sendfile()

static int lua_ap_sendfile ( lua_State L)
static

< type, mtime, ctime, atime, size

< Open the file for reading

<

Deprecated:
See also
APR_FOPEN_READ

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 822 of file lua_request.c.

◆ lua_ap_server_info()

static int lua_ap_server_info ( lua_State L)
static

Definition at line 1593 of file lua_request.c.

◆ lua_ap_set_context_info()

static int lua_ap_set_context_info ( lua_State L)
static

ap_set_context_info: Set context_prefix and context_document_root.

Parameters
rThe request
prefixthe URI prefix, without trailing slash
document_rootthe corresponding directory on disk, without trailing slash
Note
If one of prefix of document_root is NULL, the corrsponding property will not be changed.

Definition at line 1631 of file lua_request.c.

◆ lua_ap_set_document_root()

static int lua_ap_set_document_root ( lua_State L)
static

Definition at line 1466 of file lua_request.c.

◆ lua_ap_set_keepalive()

static int lua_ap_set_keepalive ( lua_State L)
static

ap_set_keepalive (request_rec *r) Set the keepalive status for this request

Parameters
rThe current request
Returns
1 if keepalive can be set, 0 otherwise

Definition at line 1730 of file lua_request.c.

◆ lua_ap_some_auth_required()

static int lua_ap_some_auth_required ( request_rec r)
static

Definition at line 817 of file lua_request.c.

◆ lua_ap_started()

static int lua_ap_started ( request_rec r)
static

Definition at line 795 of file lua_request.c.

◆ lua_ap_stat()

static int lua_ap_stat ( lua_State L)
static

< type, mtime, ctime, atime, size

< Module has handled this stage.

< Modification Time

< Access Time

< Creation or inode-changed time

< Size of the file

< Type

< all protections

Definition at line 1523 of file lua_request.c.

◆ lua_ap_state_query()

static int lua_ap_state_query ( lua_State L)
static

Definition at line 1838 of file lua_request.c.

◆ lua_ap_strcmp_match()

static int lua_ap_strcmp_match ( lua_State L)
static

ap_strcmp_match (const char str, const char *expected) Determine if a string matches a pattern containing the wildcards '?' or ''

Parameters
strThe string to check
expectedThe pattern to match against
ignoreCaseWhether to ignore case when matching
Returns
1 if the two strings match, 0 otherwise

Definition at line 1703 of file lua_request.c.

◆ lua_ap_unescape()

static int lua_ap_unescape ( lua_State L)
static

Definition at line 912 of file lua_request.c.

◆ lua_ap_usleep()

static int lua_ap_usleep ( lua_State L)
static

Definition at line 1854 of file lua_request.c.

◆ lua_apr_b64decode()

static int lua_apr_b64decode ( lua_State L)
static

Definition at line 887 of file lua_request.c.

◆ lua_apr_b64encode()

static int lua_apr_b64encode ( lua_State L)
static

Definition at line 862 of file lua_request.c.

◆ lua_apr_date_parse_rfc()

static int lua_apr_date_parse_rfc ( lua_State L)
static

Definition at line 1096 of file lua_request.c.

◆ lua_apr_htpassword()

static int lua_apr_htpassword ( lua_State L)
static

Definition at line 995 of file lua_request.c.

◆ lua_apr_md5()

static int lua_apr_md5 ( lua_State L)
static

Definition at line 951 of file lua_request.c.

◆ lua_apr_mkdir()

static int lua_apr_mkdir ( lua_State L)
static

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 1040 of file lua_request.c.

◆ lua_apr_mkrdir()

static int lua_apr_mkrdir ( lua_State L)
static

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 1060 of file lua_request.c.

◆ lua_apr_rmdir()

static int lua_apr_rmdir ( lua_State L)
static

Definition at line 1079 of file lua_request.c.

◆ lua_apr_sha1()

static int lua_apr_sha1 ( lua_State L)
static

Definition at line 969 of file lua_request.c.

◆ lua_apr_touch()

static int lua_apr_touch ( lua_State L)
static

Definition at line 1021 of file lua_request.c.

◆ lua_get_cookie()

static int lua_get_cookie ( lua_State L)
static

Definition at line 2049 of file lua_request.c.

◆ lua_ivm_get()

static int lua_ivm_get ( lua_State L)
static

Definition at line 1984 of file lua_request.c.

◆ lua_ivm_set()

static int lua_ivm_set ( lua_State L)
static

Definition at line 2009 of file lua_request.c.

◆ lua_read_body()

static int lua_read_body ( request_rec r,
const char **  rbuf,
apr_off_t size,
apr_off_t  maxsize 
)
static

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

Definition at line 233 of file lua_request.c.

◆ lua_set_cookie()

static int lua_set_cookie ( lua_State L)
static

Definition at line 2063 of file lua_request.c.

◆ lua_websocket_close()

static int lua_websocket_close ( lua_State L)
static

Definition at line 2455 of file lua_request.c.

◆ lua_websocket_greet()

static int lua_websocket_greet ( lua_State L)
static

Definition at line 2187 of file lua_request.c.

◆ lua_websocket_peek()

static int lua_websocket_peek ( lua_State L)
static

Definition at line 2251 of file lua_request.c.

◆ lua_websocket_ping()

static int lua_websocket_ping ( lua_State L)
static

Definition at line 2475 of file lua_request.c.

◆ lua_websocket_read()

static int lua_websocket_read ( lua_State L)
static

Definition at line 2272 of file lua_request.c.

◆ lua_websocket_readbytes()

static apr_status_t lua_websocket_readbytes ( conn_rec c,
apr_bucket_brigade brigade,
char buffer,
apr_off_t  len 
)
static

Definition at line 2231 of file lua_request.c.

◆ lua_websocket_write()

static int lua_websocket_write ( lua_State L)
static

Definition at line 2403 of file lua_request.c.

◆ lua_write_body()

static apr_status_t lua_write_body ( request_rec r,
apr_file_t file,
apr_off_t size 
)
static

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

Definition at line 280 of file lua_request.c.

◆ makefun()

static req_fun_t * makefun ( const void *  fun,
int  type,
apr_pool_t pool 
)
static

Definition at line 2707 of file lua_request.c.

◆ read_cfg_tree()

static void read_cfg_tree ( lua_State L,
request_rec r,
ap_directive_t rcfg 
)
static

Definition at line 2609 of file lua_request.c.

◆ req_add_output_filter()

static int req_add_output_filter ( lua_State L)
static

Definition at line 537 of file lua_request.c.

◆ req_alert()

static int req_alert ( lua_State L)
static

Definition at line 1955 of file lua_request.c.

◆ req_ap_auth_type_field()

static const char * req_ap_auth_type_field ( request_rec r)
static

Definition at line 652 of file lua_request.c.

◆ req_ap_get_server_port()

static int req_ap_get_server_port ( request_rec r)
static

Definition at line 757 of file lua_request.c.

◆ req_aprtable2luatable()

static int req_aprtable2luatable ( lua_State L,
apr_table_t t 
)
static

Definition at line 319 of file lua_request.c.

◆ req_aprtable2luatable_cb()

static int req_aprtable2luatable_cb ( void *  l,
const char key,
const char value 
)
static

Definition at line 128 of file lua_request.c.

◆ req_aprtable2luatable_cb_len()

static int req_aprtable2luatable_cb_len ( void *  l,
const char key,
const char value,
size_t  len 
)
static

Definition at line 177 of file lua_request.c.

◆ req_args_field()

static const char * req_args_field ( request_rec r)
static

Definition at line 622 of file lua_request.c.

◆ req_assbackwards_field()

static int req_assbackwards_field ( request_rec r)
static

Definition at line 702 of file lua_request.c.

◆ req_canonical_filename_field()

static const char * req_canonical_filename_field ( request_rec r)
static

Definition at line 632 of file lua_request.c.

◆ req_construct_url()

static int req_construct_url ( lua_State L)
static

Definition at line 548 of file lua_request.c.

◆ req_content_encoding_field()

static const char * req_content_encoding_field ( request_rec r)
static

Definition at line 657 of file lua_request.c.

◆ req_content_type_field()

static const char * req_content_type_field ( request_rec r)
static

Definition at line 662 of file lua_request.c.

◆ req_context_document_root()

static const char * req_context_document_root ( request_rec r)
static

Definition at line 589 of file lua_request.c.

◆ req_context_prefix()

static const char * req_context_prefix ( request_rec r)
static

Definition at line 584 of file lua_request.c.

◆ req_crit()

static int req_crit ( lua_State L)
static

Definition at line 1959 of file lua_request.c.

◆ req_debug()

static int req_debug ( lua_State L)
static

Definition at line 1979 of file lua_request.c.

◆ req_dispatch()

static int req_dispatch ( lua_State L)
static

Definition at line 1865 of file lua_request.c.

◆ req_document_root()

static const char * req_document_root ( request_rec r)
static

Definition at line 579 of file lua_request.c.

◆ req_emerg()

static int req_emerg ( lua_State L)
static

Definition at line 1951 of file lua_request.c.

◆ req_err()

static int req_err ( lua_State L)
static

Definition at line 1963 of file lua_request.c.

◆ req_err_headers_out()

static req_table_t * req_err_headers_out ( request_rec r)
static

Definition at line 725 of file lua_request.c.

◆ req_err_headers_out_table()

static int req_err_headers_out_table ( lua_State L)
static

Definition at line 337 of file lua_request.c.

◆ req_escape_html()

static int req_escape_html ( lua_State L)
static

Definition at line 557 of file lua_request.c.

◆ req_filename_field()

static const char * req_filename_field ( request_rec r)
static

Definition at line 637 of file lua_request.c.

◆ req_handler_field()

static const char * req_handler_field ( request_rec r)
static

Definition at line 603 of file lua_request.c.

◆ req_headers_in()

static req_table_t * req_headers_in ( request_rec r)
static

Definition at line 707 of file lua_request.c.

◆ req_headers_in_table()

static int req_headers_in_table ( lua_State L)
static

Definition at line 327 of file lua_request.c.

◆ req_headers_out()

static req_table_t * req_headers_out ( request_rec r)
static

Definition at line 716 of file lua_request.c.

◆ req_headers_out_table()

static int req_headers_out_table ( lua_State L)
static

Definition at line 332 of file lua_request.c.

◆ req_hostname_field()

static const char * req_hostname_field ( request_rec r)
static

Definition at line 617 of file lua_request.c.

◆ req_info()

static int req_info ( lua_State L)
static

Definition at line 1975 of file lua_request.c.

◆ req_log_at()

static int req_log_at ( lua_State L,
int  level 
)
static

Definition at line 1934 of file lua_request.c.

◆ req_log_id_field()

static const char * req_log_id_field ( request_rec r)
static

Definition at line 682 of file lua_request.c.

◆ req_method_field()

static const char * req_method_field ( request_rec r)
static

Definition at line 599 of file lua_request.c.

◆ req_newindex()

static int req_newindex ( lua_State L)
static

Definition at line 2542 of file lua_request.c.

◆ req_notes()

static req_table_t * req_notes ( request_rec r)
static

Definition at line 743 of file lua_request.c.

◆ req_notes_table()

static int req_notes_table ( lua_State L)
static

Definition at line 342 of file lua_request.c.

◆ req_notice()

static int req_notice ( lua_State L)
static

Definition at line 1971 of file lua_request.c.

◆ req_parseargs()

static int req_parseargs ( lua_State L)
static

Definition at line 353 of file lua_request.c.

◆ req_parsebody()

static int req_parsebody ( lua_State L)
static

< Module has handled this stage.

< Module has handled this stage.

Definition at line 380 of file lua_request.c.

◆ req_path_info_field()

static const char * req_path_info_field ( request_rec r)
static

Definition at line 627 of file lua_request.c.

◆ req_protocol_field()

static const char * req_protocol_field ( request_rec r)
static

Definition at line 672 of file lua_request.c.

◆ req_proxyreq_field()

static const char * req_proxyreq_field ( request_rec r)
static

< No proxy

< Standard proxy

< Reverse proxy

< Origin response

Definition at line 607 of file lua_request.c.

◆ req_puts()

static int req_puts ( lua_State L)
static

Definition at line 510 of file lua_request.c.

◆ req_range_field()

static const char * req_range_field ( request_rec r)
static

Definition at line 667 of file lua_request.c.

◆ req_remaining_field()

static int req_remaining_field ( request_rec r)
static

Definition at line 692 of file lua_request.c.

◆ req_ssl_is_https_field()

static int req_ssl_is_https_field ( request_rec r)
static

Definition at line 752 of file lua_request.c.

◆ req_ssl_var_lookup()

static int req_ssl_var_lookup ( lua_State L)
static

Definition at line 566 of file lua_request.c.

◆ req_status_field()

static int req_status_field ( request_rec r)
static

Definition at line 697 of file lua_request.c.

◆ req_subprocess_env()

static req_table_t * req_subprocess_env ( request_rec r)
static

Definition at line 734 of file lua_request.c.

◆ req_subprocess_env_table()

static int req_subprocess_env_table ( lua_State L)
static

Definition at line 347 of file lua_request.c.

◆ req_the_request_field()

static const char * req_the_request_field ( request_rec r)
static

Definition at line 677 of file lua_request.c.

◆ req_trace1()

static int req_trace1 ( lua_State L)
static

Definition at line 2532 of file lua_request.c.

◆ req_trace2()

static int req_trace2 ( lua_State L)
static

Definition at line 2533 of file lua_request.c.

◆ req_trace3()

static int req_trace3 ( lua_State L)
static

Definition at line 2534 of file lua_request.c.

◆ req_trace4()

static int req_trace4 ( lua_State L)
static

Definition at line 2535 of file lua_request.c.

◆ req_trace5()

static int req_trace5 ( lua_State L)
static

Definition at line 2536 of file lua_request.c.

◆ req_trace6()

static int req_trace6 ( lua_State L)
static

Definition at line 2537 of file lua_request.c.

◆ req_trace7()

static int req_trace7 ( lua_State L)
static

Definition at line 2538 of file lua_request.c.

◆ req_trace8()

static int req_trace8 ( lua_State L)
static

Definition at line 2539 of file lua_request.c.

◆ req_unparsed_uri_field()

static const char * req_unparsed_uri_field ( request_rec r)
static

Definition at line 647 of file lua_request.c.

◆ req_uri_field()

static char * req_uri_field ( request_rec r)
static

Definition at line 594 of file lua_request.c.

◆ req_user_field()

static const char * req_user_field ( request_rec r)
static

Definition at line 642 of file lua_request.c.

◆ req_useragent_ip_field()

static const char * req_useragent_ip_field ( request_rec r)
static

Definition at line 687 of file lua_request.c.

◆ req_warn()

static int req_warn ( lua_State L)
static

Definition at line 1967 of file lua_request.c.

◆ req_write()

static int req_write ( lua_State L)
static

Definition at line 524 of file lua_request.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( lua_module.module_index)
static

Definition at line 38 of file lua_request.c.

◆ connection_methods

const struct luaL_Reg connection_methods[]
static
Initial value:
= {
}
return NULL
Definition mod_so.c:359

Definition at line 2681 of file lua_request.c.

◆ lua_ivm_mutex

apr_global_mutex_t* lua_ivm_mutex
extern

Definition at line 85 of file mod_lua.c.

◆ lua_ivm_shm

apr_shm_t* lua_ivm_shm
extern

Definition at line 86 of file mod_lua.c.

◆ request_methods

const struct luaL_Reg request_methods[]
static
Initial value:
= {
{"__index", req_dispatch},
{"__newindex", req_newindex},
}
static int req_dispatch(lua_State *L)
static int req_newindex(lua_State *L)

Definition at line 2673 of file lua_request.c.

◆ server_methods

const struct luaL_Reg server_methods[]
static
Initial value:
= {
}

Definition at line 2702 of file lua_request.c.