Apache HTTPD
Public Attributes | List of all members
request_rec Struct Reference

A structure that represents the current request. More...

#include <httpd.h>

Public Attributes

apr_pool_tpool
 
conn_recconnection
 
server_recserver
 
request_recnext
 
request_recprev
 
request_recmain
 
charthe_request
 
int assbackwards
 
int proxyreq
 
int header_only
 
int proto_num
 
charprotocol
 
const charhostname
 
apr_time_t request_time
 
const charstatus_line
 
int status
 
int method_number
 
const charmethod
 
apr_int64_t allowed
 
apr_array_header_tallowed_xmethods
 
ap_method_list_tallowed_methods
 
apr_off_t sent_bodyct
 
apr_off_t bytes_sent
 
apr_time_t mtime
 
const charrange
 
apr_off_t clength
 
int chunked
 
int read_body
 
int read_chunked
 
unsigned expecting_100
 
apr_bucket_brigadekept_body
 
apr_table_tbody_table
 
apr_off_t remaining
 
apr_off_t read_length
 
apr_table_theaders_in
 
apr_table_theaders_out
 
apr_table_terr_headers_out
 
apr_table_tsubprocess_env
 
apr_table_tnotes
 
const charcontent_type
 
const charhandler
 
const charcontent_encoding
 
apr_array_header_tcontent_languages
 
charvlist_validator
 
charuser
 
charap_auth_type
 
charunparsed_uri
 
charuri
 
charfilename
 
charcanonical_filename
 
charpath_info
 
charargs
 
int used_path_info
 
int eos_sent
 
struct ap_conf_vector_tper_dir_config
 
struct ap_conf_vector_trequest_config
 
const struct ap_logconflog
 
const charlog_id
 
const struct htaccess_resulthtaccess
 
struct ap_filter_toutput_filters
 
struct ap_filter_tinput_filters
 
struct ap_filter_tproto_output_filters
 
struct ap_filter_tproto_input_filters
 
int no_cache
 
int no_local_copy
 
apr_thread_mutex_tinvoke_mtx
 
apr_uri_t parsed_uri
 
apr_finfo_t finfo
 
apr_sockaddr_tuseragent_addr
 
charuseragent_ip
 
apr_table_ttrailers_in
 
apr_table_ttrailers_out
 
charuseragent_host
 
int double_reverse
 
ap_request_bnotes_t bnotes
 

Detailed Description

A structure that represents the current request.

Definition at line 845 of file httpd.h.

Member Data Documentation

◆ allowed

apr_int64_t request_rec::allowed

'allowed' is a bitvector of the allowed methods.

A handler must ensure that the request method is one that it is capable of handling. Generally modules should DECLINE any request methods they do not handle. Prior to aborting the handler like this the handler should set r->allowed to the list of methods that it is willing to handle. This bitvector is used to construct the "Allow:" header required for OPTIONS requests, and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes.

Since the default_handler deals with OPTIONS, all modules can usually decline to deal with OPTIONS. TRACE is always allowed, modules don't need to set it explicitly.

Since the default_handler will always handle a GET, a module which does not implement GET should probably return HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET handler can't be installed by mod_actions.

Definition at line 922 of file httpd.h.

◆ allowed_methods

ap_method_list_t* request_rec::allowed_methods

List of allowed methods

Definition at line 926 of file httpd.h.

◆ allowed_xmethods

apr_array_header_t* request_rec::allowed_xmethods

Array of extension methods

Definition at line 924 of file httpd.h.

◆ ap_auth_type

char* request_rec::ap_auth_type

If an authentication check was made, this gets set to the auth type.

Definition at line 1007 of file httpd.h.

◆ args

char* request_rec::args

The QUERY_ARGS extracted from this request

Definition at line 1026 of file httpd.h.

◆ assbackwards

int request_rec::assbackwards

HTTP/0.9, "simple" request (e.g. GET /foo
w/no headers)

Definition at line 868 of file httpd.h.

◆ bnotes

ap_request_bnotes_t request_rec::bnotes

Request flags associated with this request. Use AP_REQUEST_GET_FLAGS() and AP_REQUEST_SET_FLAGS() to access the elements of this field.

Definition at line 1120 of file httpd.h.

◆ body_table

apr_table_t* request_rec::body_table

For ap_body_to_table(): parsed body

Definition at line 957 of file httpd.h.

◆ bytes_sent

apr_off_t request_rec::bytes_sent

body byte count, for easy access

Definition at line 931 of file httpd.h.

◆ canonical_filename

char* request_rec::canonical_filename

The true filename stored in the filesystem, as in the true alpha case and alias correction, e.g. "Image.jpeg" not "IMAGE$1.JPE" on Windows. The core map_to_storage canonicalizes r->filename when they mismatch

Definition at line 1022 of file httpd.h.

◆ chunked

int request_rec::chunked

sending chunked transfer-coding

Definition at line 942 of file httpd.h.

◆ clength

apr_off_t request_rec::clength

The "real" content length

Definition at line 940 of file httpd.h.

◆ connection

conn_rec* request_rec::connection

The connection to the client

Definition at line 849 of file httpd.h.

◆ content_encoding

const char* request_rec::content_encoding

How to encode the data

Definition at line 997 of file httpd.h.

◆ content_languages

apr_array_header_t* request_rec::content_languages

Array of strings representing the content languages

Definition at line 999 of file httpd.h.

◆ content_type

const char* request_rec::content_type

The content-type for the current request

Definition at line 992 of file httpd.h.

◆ double_reverse

int request_rec::double_reverse

have we done double-reverse DNS? -1 yes/failure, 0 not yet, 1 yes/success

Definition at line 1115 of file httpd.h.

◆ eos_sent

int request_rec::eos_sent

A flag to determine if the eos bucket has been sent yet

Definition at line 1039 of file httpd.h.

◆ err_headers_out

apr_table_t* request_rec::err_headers_out

MIME header environment for the response, printed even on errors and persist across internal redirects

Definition at line 981 of file httpd.h.

◆ expecting_100

unsigned request_rec::expecting_100

is client waiting for a 100 response?

Definition at line 951 of file httpd.h.

◆ filename

char* request_rec::filename

The filename on disk corresponding to this response

Definition at line 1018 of file httpd.h.

◆ finfo

apr_finfo_t request_rec::finfo

finfo.protection (st_mode) set to zero if no such file

Definition at line 1094 of file httpd.h.

◆ handler

const char* request_rec::handler

The handler string that we use to call a handler function

Definition at line 994 of file httpd.h.

◆ header_only

int request_rec::header_only

HEAD request, as opposed to GET

Definition at line 875 of file httpd.h.

◆ headers_in

apr_table_t* request_rec::headers_in

MIME header environment from the request

Definition at line 976 of file httpd.h.

◆ headers_out

apr_table_t* request_rec::headers_out

MIME header environment for the response

Definition at line 978 of file httpd.h.

◆ hostname

const char* request_rec::hostname

Host, as set by full URI or Host: header. For literal IPv6 addresses, this does NOT include the surrounding [ ]

Definition at line 883 of file httpd.h.

◆ htaccess

const struct htaccess_result* request_rec::htaccess

A linked list of the .htaccess configuration directives accessed by this request. N.B. always add to the head of the list, never to the end. that way, a sub request's list can (temporarily) point to a parent's list

Definition at line 1067 of file httpd.h.

◆ input_filters

struct ap_filter_t* request_rec::input_filters

A list of input filters to be used for this request

Definition at line 1072 of file httpd.h.

◆ invoke_mtx

apr_thread_mutex_t* request_rec::invoke_mtx

Mutex protect callbacks registered with ap_mpm_register_timed_callback from being run before the original handler finishes running

Definition at line 1089 of file httpd.h.

◆ kept_body

apr_bucket_brigade* request_rec::kept_body

The optional kept body of the request.

Definition at line 953 of file httpd.h.

◆ log

const struct ap_logconf* request_rec::log

Optional request log level configuration. Will usually point to a server or per_dir config, i.e. must be copied before modifying

Definition at line 1054 of file httpd.h.

◆ log_id

const char* request_rec::log_id

Id to identify request in access and error log. Set when the first error log entry for this request is generated.

Definition at line 1059 of file httpd.h.

◆ main

request_rec* request_rec::main

Pointer to the main request if this is a sub-request (see http_request.h)

Definition at line 860 of file httpd.h.

◆ method

const char* request_rec::method

Request method (eg. GET, HEAD, POST, etc.)

Definition at line 900 of file httpd.h.

◆ method_number

int request_rec::method_number

M_GET, M_POST, etc.

Definition at line 898 of file httpd.h.

◆ mtime

apr_time_t request_rec::mtime

Last modified time of the requested resource

Definition at line 933 of file httpd.h.

◆ next

request_rec* request_rec::next

Pointer to the redirected request if this is an external redirect

Definition at line 854 of file httpd.h.

◆ no_cache

int request_rec::no_cache

This response can not be cached

Definition at line 1082 of file httpd.h.

◆ no_local_copy

int request_rec::no_local_copy

There is no local copy of this response

Definition at line 1084 of file httpd.h.

◆ notes

apr_table_t* request_rec::notes

Notes from one module to another

Definition at line 985 of file httpd.h.

◆ output_filters

struct ap_filter_t* request_rec::output_filters

A list of output filters to be used for this request

Definition at line 1070 of file httpd.h.

◆ parsed_uri

apr_uri_t request_rec::parsed_uri

A struct containing the components of URI

Definition at line 1092 of file httpd.h.

◆ path_info

char* request_rec::path_info

The PATH_INFO extracted from this request

Definition at line 1024 of file httpd.h.

◆ per_dir_config

struct ap_conf_vector_t* request_rec::per_dir_config

Options set in config files, etc.

Definition at line 1047 of file httpd.h.

◆ pool

apr_pool_t* request_rec::pool

The pool associated with the request

Definition at line 847 of file httpd.h.

◆ prev

request_rec* request_rec::prev

Pointer to the previous request if this is an internal redirect

Definition at line 856 of file httpd.h.

◆ proto_input_filters

struct ap_filter_t* request_rec::proto_input_filters

A list of protocol level input filters to be used for this request

Definition at line 1079 of file httpd.h.

◆ proto_num

int request_rec::proto_num

Protocol version number of protocol; 1.1 = 1001

Definition at line 877 of file httpd.h.

◆ proto_output_filters

struct ap_filter_t* request_rec::proto_output_filters

A list of protocol level output filters to be used for this request

Definition at line 1076 of file httpd.h.

◆ protocol

char* request_rec::protocol

Protocol string, as given to us, or HTTP/0.9

Definition at line 879 of file httpd.h.

◆ proxyreq

int request_rec::proxyreq

A proxy request (calculated during post_read_request/translate_name) possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, PROXYREQ_RESPONSE

Definition at line 873 of file httpd.h.

◆ range

const char* request_rec::range

The Range: header

Definition at line 938 of file httpd.h.

◆ read_body

int request_rec::read_body

Method for reading the request body (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY, REQUEST_CHUNKED_DECHUNK, etc...)

Definition at line 947 of file httpd.h.

◆ read_chunked

int request_rec::read_chunked

reading chunked transfer-coding

Definition at line 949 of file httpd.h.

◆ read_length

apr_off_t request_rec::read_length

Number of bytes that have been read from the request body

Definition at line 961 of file httpd.h.

◆ remaining

apr_off_t request_rec::remaining

Remaining bytes left to read from the request body

Definition at line 959 of file httpd.h.

◆ request_config

struct ap_conf_vector_t* request_rec::request_config

Notes on this request

Definition at line 1049 of file httpd.h.

◆ request_time

apr_time_t request_rec::request_time

Time when the request started

Definition at line 886 of file httpd.h.

◆ sent_bodyct

apr_off_t request_rec::sent_bodyct

byte count in stream is for body

Definition at line 929 of file httpd.h.

◆ server

server_rec* request_rec::server

The virtual host for this request

Definition at line 851 of file httpd.h.

◆ status

int request_rec::status

Status line

Definition at line 891 of file httpd.h.

◆ status_line

const char* request_rec::status_line

Status line, if set by script

Definition at line 889 of file httpd.h.

◆ subprocess_env

apr_table_t* request_rec::subprocess_env

Array of environment variables to be used for sub processes

Definition at line 983 of file httpd.h.

◆ the_request

char* request_rec::the_request

First line of request

Definition at line 866 of file httpd.h.

◆ trailers_in

apr_table_t* request_rec::trailers_in

MIME trailer environment from the request

Definition at line 1104 of file httpd.h.

◆ trailers_out

apr_table_t* request_rec::trailers_out

MIME trailer environment from the response

Definition at line 1106 of file httpd.h.

◆ unparsed_uri

char* request_rec::unparsed_uri

The URI without any parsing performed

Definition at line 1014 of file httpd.h.

◆ uri

char* request_rec::uri

The path portion of the URI, or "/" if no path provided

Definition at line 1016 of file httpd.h.

◆ used_path_info

int request_rec::used_path_info

Flag for the handler to accept or reject path_info on the current request. All modules should respect the AP_REQ_ACCEPT_PATH_INFO and AP_REQ_REJECT_PATH_INFO values, while AP_REQ_DEFAULT_PATH_INFO indicates they may follow existing conventions. This is set to the user's preference upon HOOK_VERY_FIRST of the fixups.

Definition at line 1036 of file httpd.h.

◆ user

char* request_rec::user

If an authentication check was made, this gets set to the user name.

Definition at line 1005 of file httpd.h.

◆ useragent_addr

apr_sockaddr_t* request_rec::useragent_addr

remote address information from conn_rec, can be overridden if necessary by a module. This is the address that originated the request.

Definition at line 1100 of file httpd.h.

◆ useragent_host

char* request_rec::useragent_host

Originator's DNS name, if known. NULL if DNS hasn't been checked, "" if it has and no address was found. N.B. Only access this though ap_get_useragent_host()

Definition at line 1111 of file httpd.h.

◆ useragent_ip

char* request_rec::useragent_ip

Definition at line 1101 of file httpd.h.

◆ vlist_validator

char* request_rec::vlist_validator

variant list validator (if negotiated)

Definition at line 1002 of file httpd.h.


The documentation for this struct was generated from the following file: