request . request_library . sncode
latest
List of predefined variables within Extenso.
REQUEST(1e)
NAME
request - List of predefined variables available within Extenso.
SYNOPSIS
request()
DESCRIPTION
Extenso defined a set of predefined variables or functions returning these.
sn_binversion contains the current version of the binary file. sn_version contains the current version of sncode.
REQUEST()
The variables described in this section can be set or get. They are from the request_rec structure of apache.
The function can also be called with 2 arguments: request(key,value) where key is one of the following entry in request_rec.
- the_request : string
- First line of request.
- scheme : string
- returns http or https depending on the request. Since version 5.68
- proxyreq : integer
- A proxy request (calculated during post_read_request/translate_name) possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, PROXYREQ_RESPONSE.
- header_only : integer
- HEAD request, as opposed to GET.
- protocol : string
- Protocol string, as given to us, or HTTP/0.9.
- proto_num : integer
- Protocol version number of protocol; 1.1 = 1001.
- hostname : string
- Host, as set by full URI or Host:
- request_time : string
- Time when the request started. The returned variable is a context that defines all the variables in the date function.
To set the request time, you can pass the time in the following format:- YYYY-MM-DD HH:MM:SS
- RFC 822 date
- Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
- Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
- Sun Nov 6 08:49:37 1994 ; ANSI C’s asctime() format
- Sun, 6 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
- Sun, 06 Nov 94 08:49:37 GMT ; RFC 822
- Sun, 6 Nov 94 08:49:37 GMT ; RFC 822
- Sun, 06 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk]
- Sun, 6 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk]
- Sun, 06 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
- Sun, 6 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
- status_line : string
Status line, if set by script.
- status : int
- Status line.
Definition at line 918 of file httpd.h.
- method : String
- Request method (eg. GET, HEAD, POST, etc.) Definition at line 925 of file httpd.h.
- method_number : int
- M_GET, M_POST, etc.
- apr_int64_t request_rec::allowed not implemented
- 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 949 of file httpd.h.
- apr_array_header_t* request_rec::allowed_xmethods not implemented
- ap_method_list_t* request_rec::allowed_methods not implemented
- List of allowed methods.
- apr_off_t request_rec::sent_bodyct
- byte count in stream is for body
apr_off_t request_rec::bytes_sent
body byte count, for easy access
- mtime : associative array
- Last modified time of the requested resource.
- chunked : integer
- sending chunked transfer-coding
Definition at line 965 of file httpd.h.
- range : string
- The Range: header.
- clength : integer
- The "real" content length.
- remaining : integer
- Remaining bytes left to read from the request body.
- read_length : integer
- Number of bytes that have been read from the request body.
- read_body : integer
- Method for reading the request body (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY, REQUEST_CHUNKED_DECHUNK, etc…) Definition at line 978 of file httpd.h.
- read_chunked : integer
- Reading chunked transfer-coding/p>
- expecting_100 : integer
- Is client waiting for a 100 response?
- content_type : string
- The content-type for the current request.
- handler : string
- The handler string that we use to call a handler function.
- content_encoding : string
- How to encode the data.
- content_languages : not implemented
- Array of strings representing the content languages.
- vlist_validator : not implemented
- variant list validator (if negotiated)
- user : string
- If an authentication check was made, this gets set to the user name.
- ap_auth_type : string
- If an authentication check was made, this gets set to the auth type.
- no_cache : integer
- This response can not be cached.
- no_local_copy : integer not implemented
- There is no local copy of this response.
- unparsed_uri : string
- The URI without any parsing performed.
- uri : string
- The path portion of the URI.
- filename : string
- The filename on disk corresponding to this response.
- canonical_filename : string
- The true filename, we canonicalize r→filename if these don’t match.
- path_info : string
- The PATH_INFO extracted from this request.
- args : string
- The QUERY_ARGS extracted from this request.
- finfo : not implemented
- ST_MODE set to zero if no such file.
- used_path_info : integer not implemented
- 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 1065 of file httpd.h.
- per_dir_config : not implemented
- Options set in config files, etc.
- request_config : not implemented
- Notes on this request.
- htaccess : not implemented
- 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 1083 of file httpd.h.
- output_filters : not implemented
- A list of output filters to be used for this request.
- input_filters : not implemented
- A list of input filters to be used for this request.
- proto_output_filters : not implemented
- A list of protocol level output filters to be used for this request.
- proto_input_filters : not implemented
- A list of protocol level input filters to be used for this request.
- eos_sent : not implemented
- A flag to determine if the eos bucket has been sent yet.
AUTHOR
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>