32#define APR_WANT_STRFUNC
33#define APR_WANT_MEMFUNC
60#undef APLOG_MODULE_INDEX
61#define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
131 type_len = strlen(
type);
146 concat[0].iov_len = type_len;
147 concat[1].iov_base = (
void *)
"; charset=";
148 concat[1].iov_len =
sizeof(
"; charset=") - 1;
512 "NULL bytes in header", *
s, *read, 0);
522#if APR_CHARSET_EBCDIC
593 while ((
uri[0] ==
'/') && (
uri[1] ==
'/')) {
624#if defined(OS2) || defined(WIN32)
646#define LOG_NAME_MAX_LEN 80
714 "Request received from client: %s",
822 else if (strict && *
ll) {
908 "HTTP Request Line; Invalid method token: '%.*s'",
912 "HTTP Request Line; Invalid method token: '%.*s'"
913 " (only GET is allowed for HTTP/0.9 requests)",
917 "HTTP Request Line; Missing URI");
920 "HTTP Request Line; URI incorrectly encoded: '%.*s'",
924 "HTTP Request Line; Invalid whitespace");
927 "HTTP Request Line; Excess whitespace "
928 "(disallowed by HttpProtocolOptions Strict)");
931 "HTTP Request Line; Extraneous text found '%.*s' "
932 "(perhaps whitespace was injected?)",
936 "HTTP Request Line; Rejected HTTP/0.9 request");
939 "HTTP Request Line; Unrecognized protocol '%.*s' "
940 "(perhaps whitespace was injected?)",
949 "HTTP Request Line; Unrecognized HTTP method: '%.*s' "
950 "(disallowed by RegisteredMethods)",
959 "HTTP Request Line; Unable to parse URI: '%.*s'",
968 "HTTP Request Line; URI must not contain a fragment");
974 "HTTP Request Line; URI must not contain a "
975 "username/password");
1003 int strict_host_check;
1017 "Requested hostname '%s' did not match any ServerName/ServerAlias "
1018 "in the global server configuration ",
r->
hostname);
1022 "Requested hostname '%s' did not match any ServerName/ServerAlias "
1023 "in the matching virtual host (default vhost for "
1024 "current connection is %s:%u)",
1044 "client sent HTTP/1.1 request without hostname "
1045 "(see RFC2616 section 14.23): %s",
r->
uri);
1051 && (
expect[0] !=
'\0')) {
1063 "client sent an unrecognized expectation value "
1064 "of Expect: %s",
expect);
1082 "Size of a request header field exceeds server limit.");
1084 "header exceeds LimitRequestFieldSize after merging: %.*s",
1119 "Failed to read request header line %s",
field);
1129 "Size of a request header field "
1130 "exceeds server limit.");
1132 "Request header exceeds LimitRequestFieldSize%s"
1160 "Line folding encountered before first"
1165 if (
field[1] ==
'\0') {
1168 "Empty folded line encountered");
1174 while (
field[1] ==
'\t' ||
field[1] ==
' ') {
1192 "Size of a request header field "
1193 "exceeds server limit.");
1195 "Request header exceeds LimitRequestFieldSize "
1196 "after folding: %.*s",
1203 alloc_len += alloc_len;
1232 "The number of request header fields "
1233 "exceeds this server's limit.");
1235 "Number of request headers exceeds "
1236 "LimitRequestFields");
1247 "Request header field is missing ':' "
1256 "Request header field name was empty");
1265 "Request header field name presented"
1266 " invalid whitespace");
1277 "Request header field value presented"
1289 "Request header field name is malformed: "
1311 "Request header value is malformed: "
1445 "request failed: client's request-line exceeds LimitRequestLine (longer than %d)",
1450 "request failed: malformed request line");
1482 "request failed: error reading the headers");
1493 "client sent invalid Content-Length "
1510 "client sent unknown Transfer-Encoding "
1744 "need AuthType to note auth failure: %s",
r->
uri);
1762 ?
"Proxy-Authorization"
1771 "need AuthName: %s",
r->
uri);
1783 "client used wrong authentication scheme: %s",
r->
uri);
1914 "ap_content_length_filter: "
1915 "apr_bucket_read() failed");
1952 else if (
f->c->aborted) {
1968 if (
ctx->data_sent == 0 &&
eos &&
2161 if (
vd->r->connection->aborted)
2192 if (written != -1) {
2296#if APR_CHARSET_EBCDIC
2320 const char *status_line;
2329 "Status is %d - not sending interim response",
r->
status);
2347 rr->expecting_100 = 0;
2352 if (status_line ==
NULL) {
2385 return (
index1 >= 0) ? 1 : -1;
2388 return (
index2 >= 0) ? -1 : 1;
2461 "select protocol from %s, choices=%s for server %s",
2463 s->server_hostname);
2505 "select protocol, proposals=%s preferences=%s configured=%s",
2525 "selected protocol=%s",
2541 "already at it, protocol_switch to %s",
2550 "no implementation for protocol_switch to %s",
2558 "unexpected return code %d from protocol_switch to %s"
Symbol export macros and hook functions.
#define AP_DECLARE_NONSTD(type)
#define AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)
#define AP_IMPLEMENT_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline)
#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret, name, args_decl, args_use, decline)
const char apr_size_t len
#define AP_READ_REQUEST_SUCCESS(arg0, arg1, arg2, arg3, arg4)
#define AP_READ_REQUEST_FAILURE(arg0)
#define AP_READ_REQUEST_ENTRY(arg0, arg1)
APR-UTIL Buckets/Bucket Brigades.
APR general purpose library routines.
APR-UTIL string matching routines.
APR Standard Headers Support.
ap_conf_vector_t * ap_create_request_config(apr_pool_t *p)
#define DEFAULT_LIMIT_BLANK_LINES
#define ap_http_scheme(r)
#define AP_SERVER_PROTOCOL
#define HTTP_VERSION(major, minor)
#define AP_CORE_DECLARE_NONSTD
#define ap_xlate_proto_to_ascii(x, y)
#define ap_xlate_proto_from_ascii(x, y)
#define ap_fwrite(f, bb, data, nbyte)
apr_status_t ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb)
void ap_remove_input_filter(ap_filter_t *f)
#define ap_fputs(f, bb, str)
apr_status_t ap_pass_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket)
ap_filter_t * ap_add_input_filter_handle(ap_filter_rec_t *f, void *ctx, request_rec *r, conn_rec *c)
ap_filter_t * ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
apr_status_t ap_fputstrs(ap_filter_t *f, apr_bucket_brigade *bb,...)
apr_status_t ap_get_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
#define ap_get_core_module_config(v)
const char * ap_auth_name(request_rec *r)
apr_socket_t * ap_get_conn_socket(conn_rec *c)
const char * ap_auth_type(request_rec *r)
#define AP_CORE_CONFIG_ON
ap_filter_rec_t * ap_core_input_filter_handle
server_rec * ap_server_conf
const unsigned char * buf
int ap_rflush(request_rec *r)
int ap_run_protocol_switch(conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
int ap_method_number_of(const char *method)
int ap_parse_request_line(request_rec *r)
void ap_finalize_sub_req_protocol(request_rec *sub)
void ap_setup_make_content_type(apr_pool_t *pool)
int ap_rvputs(request_rec *r,...)
int ap_run_protocol_propose(conn_rec *c, request_rec *r, server_rec *s, const apr_array_header_t *offers, apr_array_header_t *proposals)
apr_status_t ap_get_protocol_upgrades(conn_rec *c, request_rec *r, server_rec *s, int report_all, const apr_array_header_t **pupgrades)
void ap_run_pre_read_request(request_rec *r, conn_rec *c)
int ap_run_post_read_request(request_rec *r)
#define AP_GET_BASIC_AUTH_PW_NOTE
ap_method_list_t * ap_make_method_list(apr_pool_t *p, int nelts)
void ap_send_interim_response(request_rec *r, int send_headers)
void ap_parse_uri(request_rec *r, const char *uri)
const char * ap_run_protocol_get(const conn_rec *c)
apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
void ap_note_digest_auth_failure(request_rec *r)
#define AP_GETLINE_NOSPC_EOL
void ap_finalize_request_protocol(request_rec *r)
void ap_note_auth_failure(request_rec *r)
#define ap_rgetline(s, n, read, r, fold, bb)
int ap_get_basic_auth_pw(request_rec *r, const char **pw)
void ap_note_basic_auth_failure(request_rec *r)
void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r)
const char * ap_get_status_line_ex(apr_pool_t *p, int status)
apr_status_t ap_get_basic_auth_components(const request_rec *r, const char **username, const char **password)
request_rec * ap_create_request(conn_rec *conn)
int ap_post_read_request(request_rec *r)
void ap_set_content_length(request_rec *r, apr_off_t clength)
int ap_run_note_auth_failure(request_rec *r, const char *auth_type)
apr_status_t ap_switch_protocol(conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
request_rec * ap_read_request(conn_rec *conn)
const char * ap_get_protocol(conn_rec *c)
const char * ap_select_protocol(conn_rec *c, request_rec *r, server_rec *s, const apr_array_header_t *choices)
int ap_rputc(int c, request_rec *r)
void ap_set_last_modified(request_rec *r)
const char * ap_make_content_type(request_rec *r, const char *type)
int ap_run_log_transaction(request_rec *r)
void ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb)
int ap_check_request_header(request_rec *r)
int ap_getline(char *s, int n, request_rec *r, int flags)
apr_status_t ap_content_length_filter(ap_filter_t *f, apr_bucket_brigade *b)
int ap_rwrite(const void *buf, int nbyte, request_rec *r)
int ap_is_allowed_protocol(conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
int ap_discard_request_body(request_rec *r)
apr_status_t ap_rgetline_core(char **s, apr_size_t n, apr_size_t *read, request_rec *r, int flags, apr_bucket_brigade *bb)
int ap_vrprintf(request_rec *r, const char *fmt, va_list va)
ap_filter_rec_t * ap_old_write_func
apr_status_t ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t len, apr_size_t *nbytes)
apr_status_t ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *bb)
void ap_get_mime_headers(request_rec *r)
#define AP_PROTOCOL_HTTP1
apr_bucket * ap_bucket_error_create(int error, const char *buf, apr_pool_t *p, apr_bucket_alloc_t *list)
apr_bucket * ap_bucket_eor_create(apr_bucket_alloc_t *list, request_rec *r)
int ap_run_create_request(request_rec *r)
void ap_die(int type, request_rec *r)
#define APR_STATUS_IS_EINVAL(s)
#define APR_STATUS_IS_ENOSPC(s)
#define APR_STATUS_IS_TIMEUP(s)
#define APR_STATUS_IS_EAGAIN(s)
apr_brigade_flush void const char apr_size_t nbyte
#define APR_BUCKET_IS_FLUSH(e)
#define APR_BUCKET_IS_METADATA(e)
#define APR_BRIGADE_PREPEND(a, b)
#define APR_BRIGADE_INSERT_TAIL(b, e)
#define APR_BUCKET_NEXT(e)
#define APR_BRIGADE_CONCAT(a, b)
#define APR_BRIGADE_EMPTY(b)
#define APR_BRIGADE_SENTINEL(b)
#define APR_BUCKET_IS_EOS(e)
apr_brigade_flush void * ctx
#define APR_BRIGADE_FIRST(b)
#define APR_BUCKET_INSERT_BEFORE(a, b)
#define apr_bucket_read(e, str, len, block)
apr_brigade_flush void va_list va
const char apr_ssize_t int flags
#define APR_HOOK_LINK(name)
#define APR_HOOK_STRUCT(members)
#define apr_strmatch(pattern, s, slen)
#define HTTP_REQUEST_TIME_OUT
#define HTTP_REQUEST_URI_TOO_LARGE
#define AP_STATUS_IS_HEADER_ONLY(x)
#define HTTP_VERSION_NOT_SUPPORTED
#define HTTP_INTERNAL_SERVER_ERROR
#define ap_is_HTTP_INFO(x)
#define HTTP_EXPECTATION_FAILED
#define HTTP_UNAUTHORIZED
#define HTTP_NOT_IMPLEMENTED
ap_filter_rec_t * ap_http_input_filter_handle
int ap_array_str_index(const apr_array_header_t *array, const char *s, int start)
const char const char int ap_is_chunked(apr_pool_t *p, const char *line)
const char * ap_scan_http_token(const char *ptr)
int ap_cstr_casecmp(const char *s1, const char *s2)
char * ap_getword(apr_pool_t *p, const char **line, char stop)
char * ap_escape_logitem(apr_pool_t *p, const char *str)
#define ap_strchr_c(s, c)
#define AP_DEBUG_ASSERT(exp)
char * ap_pbase64decode(apr_pool_t *p, const char *bufcoded)
const char * ap_scan_vchar_obstext(const char *ptr)
char * ap_getword_nulls(apr_pool_t *p, const char **line, char stop)
int ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
const char * ap_scan_http_field_content(const char *ptr)
int ap_parse_strict_length(apr_off_t *len, const char *str)
int ap_array_str_contains(const apr_array_header_t *array, const char *s)
const char int apr_pool_t * pool
apr_seek_where_t apr_off_t * offset
void const char apr_status_t(* cleanup)(void *))
apr_vformatter_buff_t const char * fmt
apr_vformatter_buff_t * c
#define apr_pool_create(newpool, parent)
#define apr_pcalloc(p, size)
#define APR_ARRAY_PUSH(ary, type)
#define APR_OVERLAP_TABLES_MERGE
#define APR_ARRAY_IDX(ary, i, type)
const char const char * password
#define APR_RFC822_DATE_LEN
#define AP_REQ_DEFAULT_PATH_INFO
static const char * http_scheme(const request_rec *r)
#define AP_HTTP09_DISABLE
#define ADD_DEFAULT_CHARSET_ON
#define AP_HTTP_METHODS_REGISTERED
#define AP_HTTP_CONFORMANCE_UNSAFE
mod_core private header file
static int send_headers(request_rec *r, proxy_conn_rec *conn)
static int protocol_cmp(const apr_array_header_t *preferences, const char *proto1, const char *proto2)
static int table_do_fn_check_lengths(void *r_, const char *key, const char *value)
static void end_output_stream(request_rec *r, int status)
static apr_status_t buffer_output(request_rec *r, const char *str, apr_size_t len)
static int field_name_len(const char *field)
static int r_flush(apr_vformatter_buff_t *buff)
static int send_header(void *data, const char *key, const char *val)
static const apr_strmatch_pattern * charset_pattern
static ap_filter_t * insert_old_write_filter(request_rec *r)
static const apr_strmatch_pattern ** needcset_patterns
static void strip_headers_request_body(request_rec *rnew)
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
static const char * needcset[]
static void apply_server_config(request_rec *r)
int ap_rprintf(request_rec *r, const char *fmt,...)
Apache scoreboard library.
int ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r)
This structure is used for recording information about the registered filters. It associates a name w...
The representation of a filter chain.
apr_vformatter_buff_t vbuff
Structure to store things which are per connection.
apr_sockaddr_t * client_addr
ap_conn_keepalive_e keepalive
struct ap_filter_t * input_filters
struct ap_filter_t * output_filters
struct apr_bucket_alloc_t * bucket_alloc
apr_bucket_brigade * tmpbb
Per-directory configuration.
unsigned add_default_charset
const char * add_default_charset_name
Per-request configuration.
int protocols_honor_order
apr_array_header_t * protocols
unsigned int strict_host_check
apr_bucket_brigade * tmpbb
A structure that represents the current request.
apr_table_t * trailers_in
struct ap_filter_t * output_filters
struct ap_filter_t * proto_input_filters
apr_sockaddr_t * useragent_addr
apr_bucket_brigade * kept_body
ap_method_list_t * allowed_methods
apr_table_t * err_headers_out
struct ap_filter_t * proto_output_filters
struct ap_filter_t * input_filters
struct ap_conf_vector_t * request_config
apr_table_t * subprocess_env
struct ap_conf_vector_t * per_dir_config
apr_table_t * trailers_out
apr_table_t * headers_out
A structure to store information for each virtual server.
apr_interval_time_t timeout
unsigned defn_line_number
struct ap_conf_vector_t * lookup_defaults
struct ap_conf_vector_t * module_config
apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
Utilities for EBCDIC conversion.
int ap_update_vhost_from_headers_ex(request_rec *r, int require_match)