31#define APR_WANT_STRFUNC
32#define APR_WANT_MEMFUNC
76 "101 Switching Protocols",
82 "203 Non-Authoritative Information",
85 "206 Partial Content",
87 "208 Already Reported",
107 "300 Multiple Choices",
108 "301 Moved Permanently",
114 "307 Temporary Redirect",
115 "308 Permanent Redirect",
119 "402 Payment Required",
122 "405 Method Not Allowed",
123 "406 Not Acceptable",
124 "407 Proxy Authentication Required",
125 "408 Request Timeout",
128 "411 Length Required",
129 "412 Precondition Failed",
130 "413 Request Entity Too Large",
131 "414 Request-URI Too Long",
132 "415 Unsupported Media Type",
133 "416 Requested Range Not Satisfiable",
134 "417 Expectation Failed",
138 "421 Misdirected Request",
139 "422 Unprocessable Entity",
141 "424 Failed Dependency",
143 "426 Upgrade Required",
145 "428 Precondition Required",
146 "429 Too Many Requests",
148 "431 Request Header Fields Too Large",
168 "451 Unavailable For Legal Reasons",
170 "500 Internal Server Error",
171 "501 Not Implemented",
173 "503 Service Unavailable",
174 "504 Gateway Timeout",
175 "505 HTTP Version Not Supported",
176 "506 Variant Also Negotiates",
177 "507 Insufficient Storage",
181 "511 Network Authentication Required"
193#define METHOD_NUMBER_FIRST (M_INVALID + 1)
199#define METHOD_NUMBER_LAST 62
262 "Transfer-Encoding"))
746 "Maximum new request methods %d reached while "
747 "registering method %s.",
756#define UNKNOWN_METHOD (-1)
1002 for (
i = 0;
i < 5;
i++) {
1029 else if (index == -2) {
1121 const char *notes, *
result;
1138 const char *location)
1149 "<p>The document has moved <a href=\"",
1151 "\">here</a>.</p>\n",
1155 "<p>The answer to your request is located "
1158 "\">here</a>.</p>\n",
1161 return(
"<p>This resource is only accessible "
1162 "through the proxy\n"
1163 "<br />\nYou will need to configure "
1164 "your client to use that proxy.</p>\n");
1167 return(
"<p>This server could not verify that you\n"
1168 "are authorized to access the document\n"
1169 "requested. Either you supplied the wrong\n"
1170 "credentials (e.g., bad password), or your\n"
1171 "browser doesn't understand how to supply\n"
1172 "the credentials required.</p>\n");
1175 "<p>Your browser sent a request that "
1176 "this server could not understand.<br />\n",
1180 return(
add_optional_notes(
r,
"<p>You don't have permission to access this resource.",
"error-notes",
"</p>\n"));
1182 return(
"<p>The requested URL was not found on this server.</p>\n");
1185 "<p>The requested method ",
1187 " is not allowed for this URL.</p>\n",
1191 "<p>An appropriate representation of the requested resource "
1192 "could not be found on this server.</p>\n",
1193 "variant-list",
""));
1198 "<p>A request of the requested method ",
1200 " requires a valid Content-length.<br />\n",
1204 return(
"<p>The precondition on the request "
1205 "for this URL evaluated to false.</p>\n");
1210 " not supported for current URL.<br />\n",
1214 s1 =
"<p>The proxy server received an invalid" CRLF
1215 "response from an upstream server.<br />" CRLF;
1218 return(
"<p>A variant for the requested "
1220 "\n</pre>\nis itself a negotiable resource. "
1221 "This indicates a configuration error.</p>\n");
1223 return(
"<p>Server timeout waiting for the HTTP request from the client.</p>\n");
1225 return(
"<p>The requested resource is no longer available on this server"
1226 " and there is no forwarding address.\n"
1227 "Please remove all references to this resource.</p>\n");
1230 "The requested resource does not allow request data with ",
1232 " requests, or the amount of data provided in\n"
1233 "the request exceeds the capacity limit.\n",
1236 s1 =
"<p>The requested URL's length exceeds the capacity\n"
1237 "limit for this server.<br />\n";
1240 return(
"<p>The supplied request data is not in a format\n"
1241 "acceptable for processing by this resource.</p>\n");
1243 return(
"<p>None of the range-specifier values in the Range\n"
1244 "request-header field overlap the current extent\n"
1245 "of the selected resource.</p>\n");
1250 "<p>The expectation given in the Expect request-header\n"
1251 "field could not be met by this server.\n"
1252 "The client sent<pre>\n Expect: ",
1256 s1 =
"<p>No expectation was seen, the Expect request-header \n"
1257 "field was not presented by the client.\n";
1259 "<p>Only the 100-continue expectation is supported.</p>\n");
1261 return(
"<p>The server understands the media type of the\n"
1262 "request entity, but was unable to process the\n"
1263 "contained instructions.</p>\n");
1265 return(
"<p>The requested resource is currently locked.\n"
1266 "The lock must be released or proper identification\n"
1267 "given before the method can be applied.</p>\n");
1269 return(
"<p>The method could not be performed on the resource\n"
1270 "because the requested action depended on another\n"
1271 "action and that other action failed.</p>\n");
1273 return(
"<p>The requested resource can only be retrieved\n"
1274 "using SSL. The server is willing to upgrade the current\n"
1275 "connection to SSL, but your client doesn't support it.\n"
1276 "Either upgrade your client, or try requesting the page\n"
1277 "using https://\n");
1279 return(
"<p>The request is required to be conditional.</p>\n");
1281 return(
"<p>The user has sent too many requests\n"
1282 "in a given amount of time.</p>\n");
1284 return(
"<p>The server refused this request because\n"
1285 "the request header fields are too large.</p>\n");
1287 return(
"<p>The method could not be performed on the resource\n"
1288 "because the server is unable to store the\n"
1289 "representation needed to successfully complete the\n"
1290 "request. There is insufficient free space left in\n"
1291 "your storage allocation.</p>\n");
1293 return(
"<p>The server is temporarily unable to service your\n"
1294 "request due to maintenance downtime or capacity\n"
1295 "problems. Please try again later.</p>\n");
1297 return(
"<p>The gateway did not receive a timely response\n"
1298 "from the upstream server or application.</p>\n");
1300 return(
"<p>The server terminated an operation because\n"
1301 "it encountered an infinite loop.</p>\n");
1303 return(
"<p>A mandatory extension policy in the request is not\n"
1304 "accepted by the server for this resource.</p>\n");
1306 return(
"<p>The client needs to authenticate to gain\n"
1307 "network access.</p>\n");
1309 return(
"<p>The client needs a new connection for this\n"
1310 "request as the requested host name does not match\n"
1311 "the Server Name Indication (SNI) in use for this\n"
1312 "connection.</p>\n");
1315 "<p>Access to this URL has been denied for legal reasons.<br />\n",
1316 "error-notes",
"</p>\n"));
1326 "error-notes")) !=
NULL)
1333 "<p>The server encountered an internal "
1335 "misconfiguration and was unable to complete\n"
1336 "your request.</p>\n"
1337 "<p>Please contact the server "
1338 "administrator at \n ",
1341 " to inform them of the time this "
1343 " and the actions you performed just before "
1345 "<p>More information about this error "
1346 "may be available\n"
1347 "in the server error log.</p>\n",
1410 if (location ==
NULL) {
1427 if ((location !=
NULL) && *location) {
1440 "suppress-error-charset") !=
NULL) {
1508 }
else if (
len == 4) {
1524 "<html><head>\n<title>",
title,
1525 "</title>\n</head><body>\n<h1>",
h1,
"</h1>\n",
1535 "\nerror was encountered while trying to use an "
1536 "ErrorDocument to handle the request.</p>\n",
NULL);
1569 dest->method_mask =
src->method_mask;
1571 for (
i = 0;
i <
src->method_list->nelts; ++
i) {
Symbol export macros and hook functions.
#define AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)
Apache Multi-Processing Module library.
const char apr_size_t len
APR-UTIL Buckets/Bucket Brigades.
APR general purpose library routines.
apr_size_t const unsigned char unsigned int unsigned int d
APR Standard Headers Support.
#define APLOG_USE_MODULE(foo)
#define HTTP_VERSION(major, minor)
#define ap_rvputs_proto_in_ascii
#define ap_get_core_module_config(v)
int ap_method_number_of(const char *method)
void ap_method_registry_init(apr_pool_t *p)
void ap_set_accept_ranges(request_rec *r)
int ap_meets_conditions(request_rec *r)
ap_condition_e ap_condition_if_modified_since(request_rec *r, apr_table_t *headers)
int ap_method_register(apr_pool_t *p, const char *methname)
void ap_method_list_remove(ap_method_list_t *l, const char *method)
ap_method_list_t * ap_make_method_list(apr_pool_t *p, int nelts)
void ap_method_list_add(ap_method_list_t *l, const char *method)
void ap_send_error_response(request_rec *r, int recursive_error)
void ap_finalize_request_protocol(request_rec *r)
int ap_set_keepalive(request_rec *r)
ap_condition_e ap_condition_if_range(request_rec *r, apr_table_t *headers)
ap_condition_e ap_condition_if_unmodified_since(request_rec *r, apr_table_t *headers)
const char * ap_get_status_line_ex(apr_pool_t *p, int status)
int ap_index_of_response(int status)
void ap_run_insert_error_filter(request_rec *r)
static APR_INLINE int ap_rputs(const char *str, request_rec *r)
int ap_method_in_list(ap_method_list_t *l, const char *method)
void ap_set_content_type_ex(request_rec *r, const char *ct, int trusted)
void ap_clear_method_list(ap_method_list_t *l)
void ap_set_content_type(request_rec *r, const char *ct)
const char * ap_method_name_of(apr_pool_t *p, int methnum)
void ap_copy_method_list(ap_method_list_t *dest, ap_method_list_t *src)
ap_condition_e ap_condition_if_match(request_rec *r, apr_table_t *headers)
ap_condition_e ap_condition_if_none_match(request_rec *r, apr_table_t *headers)
const char * ap_get_status_line(int status)
#define APR_HOOK_LINK(name)
#define APR_HOOK_STRUCT(members)
#define HTTP_MULTIPLE_CHOICES
#define HTTP_SERVICE_UNAVAILABLE
#define HTTP_LENGTH_REQUIRED
#define HTTP_REQUEST_TIME_OUT
#define HTTP_INSUFFICIENT_STORAGE
#define HTTP_PROXY_AUTHENTICATION_REQUIRED
#define HTTP_RANGE_NOT_SATISFIABLE
#define HTTP_PRECONDITION_FAILED
#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
#define HTTP_UNSUPPORTED_MEDIA_TYPE
#define HTTP_PRECONDITION_REQUIRED
#define HTTP_UPGRADE_REQUIRED
#define HTTP_REQUEST_URI_TOO_LARGE
#define AP_STATUS_IS_HEADER_ONLY(x)
#define HTTP_NOT_MODIFIED
#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
#define HTTP_FAILED_DEPENDENCY
#define HTTP_TOO_MANY_REQUESTS
#define HTTP_MOVED_TEMPORARILY
#define HTTP_PERMANENT_REDIRECT
#define ap_is_HTTP_REDIRECT(x)
#define HTTP_METHOD_NOT_ALLOWED
#define HTTP_REQUEST_ENTITY_TOO_LARGE
#define HTTP_EXPECTATION_FAILED
#define HTTP_MOVED_PERMANENTLY
#define HTTP_GATEWAY_TIME_OUT
#define HTTP_NETWORK_AUTHENTICATION_REQUIRED
#define HTTP_UNPROCESSABLE_ENTITY
#define HTTP_UNAUTHORIZED
#define HTTP_NOT_ACCEPTABLE
#define HTTP_NOT_IMPLEMENTED
#define ap_is_HTTP_SUCCESS(x)
#define HTTP_TEMPORARY_REDIRECT
#define HTTP_MISDIRECTED_REQUEST
#define HTTP_VARIANT_ALSO_VARIES
#define HTTP_LOOP_DETECTED
#define ap_status_drops_connection(x)
#define HTTP_NOT_EXTENDED
char * ap_response_code_string(request_rec *r, int error_index)
int ap_send_http_options(request_rec *r)
#define M_VERSION_CONTROL
#define M_BASELINE_CONTROL
const char const char int ap_is_chunked(apr_pool_t *p, const char *line)
const char * ap_psignature(const char *prefix, request_rec *r)
int ap_find_etag_weak(apr_pool_t *p, const char *line, const char *tok)
int ap_find_etag_strong(apr_pool_t *p, const char *line, const char *tok)
int ap_find_token(apr_pool_t *p, const char *line, const char *tok)
#define ap_escape_html(p, s)
int ap_array_str_contains(const apr_array_header_t *array, const char *s)
apr_array_header_t ** result
#define APR_HASH_KEY_STRING
apr_uint32_t apr_pool_t apr_uint32_t apr_pollset_method_e method
#define APR_ARRAY_PUSH(ary, type)
#define apr_time_sec(time)
#define AP_REQUEST_SET_BNOTE(r, mask, val)
#define AP_REQUEST_TRUSTED_CT
apr_status_t ap_mpm_query(int query_code, int *result)
#define AP_MPMQ_MPM_STATE
#define AP_MAXRANGES_NORANGES
static void register_one_method(apr_pool_t *p, const char *methname, int methnum)
static int is_mpm_running(void)
static const char * get_canned_error_string(int status, request_rec *r, const char *location)
static char * make_allow(request_rec *r)
static apr_status_t ap_method_registry_destroy(void *notused)
static const char * add_optional_notes(request_rec *r, const char *prefix, const char *key, const char *suffix)
#define METHOD_NUMBER_FIRST
static apr_hash_t * methods_registry
#define METHOD_NUMBER_LAST
static int lookup_builtin_method(const char *method, apr_size_t len)
static const char *const status_lines[103]
static int index_of_response(int status)
static int cur_method_number
mod_core private header file
Structure for handling HTTP methods.
apr_array_header_t * method_list
ap_conn_keepalive_e keepalive
Per-directory configuration.
Per-request configuration.
A structure that represents the current request.
apr_array_header_t * content_languages
const char * content_type
struct ap_filter_t * output_filters
ap_method_list_t * allowed_methods
apr_table_t * err_headers_out
struct ap_filter_t * proto_output_filters
struct ap_conf_vector_t * request_config
apr_table_t * subprocess_env
struct ap_conf_vector_t * per_dir_config
const char * content_encoding
apr_table_t * headers_out
apr_interval_time_t keep_alive_timeout
struct ap_conf_vector_t * module_config
Utilities for EBCDIC conversion.
Apache date-time handling functions.