Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
http_protocol.h File Reference

HTTP protocol handling. More...

#include "httpd.h"
#include "apr_portable.h"
#include "apr_mmap.h"
#include "apr_buckets.h"
#include "util_filter.h"
Include dependency graph for http_protocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ap_bucket_error
 A bucket referring to an HTTP error. More...
 

Macros

#define AP_METHOD_CHECK_ALLOWED(mask, methname)   ((mask) & (AP_METHOD_BIT << ap_method_number_of((methname))))
 
#define AP_GET_BASIC_AUTH_PW_NOTE   "AP_GET_BASIC_AUTH_PW_NOTE"
 
#define AP_GETLINE_FOLD   (1 << 0) /* Whether to merge continuation lines */
 
#define AP_GETLINE_CRLF   (1 << 1) /* Whether line ends must be CRLF */
 
#define AP_GETLINE_NOSPC_EOL
 
#define AP_GETLINE_NONBLOCK   (1 << 3) /* Whether to read non-blocking */
 
#define AP_PROTOCOL_HTTP1   "http/1.1"
 
#define AP_BUCKET_IS_ERROR(e)   (e->type == &ap_bucket_type_error)
 

Typedefs

typedef struct ap_bucket_error ap_bucket_error
 

Enumerations

enum  ap_condition_e { AP_CONDITION_NONE, AP_CONDITION_NOMATCH, AP_CONDITION_WEAK, AP_CONDITION_STRONG }
 

Functions

void insert_error_filter (request_rec *r)
 
request_recap_create_request (conn_rec *c)
 
request_recap_read_request (conn_rec *c)
 
void ap_get_mime_headers (request_rec *r)
 
void ap_get_mime_headers_core (request_rec *r, apr_bucket_brigade *bb)
 
void ap_finalize_request_protocol (request_rec *r)
 
void ap_send_error_response (request_rec *r, int recursive_error)
 
void ap_set_content_length (request_rec *r, apr_off_t length)
 
int ap_set_keepalive (request_rec *r)
 
apr_time_t ap_rationalize_mtime (request_rec *r, apr_time_t mtime)
 
const char * ap_make_content_type (request_rec *r, const char *type)
 
void ap_setup_make_content_type (apr_pool_t *pool)
 
char * ap_make_etag (request_rec *r, int force_weak)
 
void ap_set_etag (request_rec *r)
 
void ap_set_last_modified (request_rec *r)
 
ap_condition_e ap_condition_if_match (request_rec *r, apr_table_t *headers)
 
ap_condition_e ap_condition_if_unmodified_since (request_rec *r, apr_table_t *headers)
 
ap_condition_e ap_condition_if_none_match (request_rec *r, apr_table_t *headers)
 
ap_condition_e ap_condition_if_modified_since (request_rec *r, apr_table_t *headers)
 
ap_condition_e ap_condition_if_range (request_rec *r, apr_table_t *headers)
 
int ap_meets_conditions (request_rec *r)
 
apr_status_t ap_send_fd (apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes)
 
apr_size_t ap_send_mmap (apr_mmap_t *mm, request_rec *r, apr_size_t offset, apr_size_t length)
 
int ap_method_register (apr_pool_t *p, const char *methname)
 
void ap_method_registry_init (apr_pool_t *p)
 
ap_method_list_tap_make_method_list (apr_pool_t *p, int nelts)
 
void ap_copy_method_list (ap_method_list_t *dest, ap_method_list_t *src)
 
int ap_method_in_list (ap_method_list_t *l, const char *method)
 
void ap_method_list_add (ap_method_list_t *l, const char *method)
 
void ap_method_list_remove (ap_method_list_t *l, const char *method)
 
void ap_clear_method_list (ap_method_list_t *l)
 
void ap_set_content_type (request_rec *r, const char *ct)
 
void ap_set_accept_ranges (request_rec *r)
 
int ap_rputc (int c, request_rec *r)
 
int ap_rwrite (const void *buf, int nbyte, request_rec *r)
 
int ap_rvputs (request_rec *r,...) AP_FN_ATTR_SENTINEL
 
int ap_vrprintf (request_rec *r, const char *fmt, va_list vlist)
 
int ap_rprintf (request_rec *r, const char *fmt,...) __attribute__((format(printf
 
int int ap_rflush (request_rec *r)
 
int ap_index_of_response (int status)
 
const char * ap_get_status_line (int status)
 
const char * ap_get_status_line_ex (apr_pool_t *p, int status)
 
int ap_setup_client_block (request_rec *r, int read_policy)
 
int ap_should_client_block (request_rec *r)
 
long ap_get_client_block (request_rec *r, char *buffer, apr_size_t bufsiz)
 
int ap_map_http_request_error (apr_status_t rv, int status)
 
int ap_discard_request_body (request_rec *r)
 
void ap_note_auth_failure (request_rec *r)
 
void ap_note_basic_auth_failure (request_rec *r)
 
void ap_note_digest_auth_failure (request_rec *r)
 
int note_auth_failure (request_rec *r, const char *auth_type)
 
int ap_get_basic_auth_pw (request_rec *r, const char **pw)
 
apr_status_t ap_get_basic_auth_components (const request_rec *r, const char **username, const char **password)
 
void ap_parse_uri (request_rec *r, const char *uri)
 
int ap_getline (char *s, int n, request_rec *r, int flags)
 
apr_status_t ap_fgetline (char **s, apr_size_t n, apr_size_t *read, ap_filter_t *f, int flags, apr_bucket_brigade *bb, apr_pool_t *p)
 
apr_status_t ap_rgetline (char **s, apr_size_t n, apr_size_t *read, request_rec *r, int flags, apr_bucket_brigade *bb)
 
int ap_method_number_of (const char *method)
 
const char * ap_method_name_of (apr_pool_t *p, int methnum)
 
void pre_read_request (request_rec *r, conn_rec *c)
 
int post_read_request (request_rec *r)
 
int log_transaction (request_rec *r)
 
const char * http_scheme (const request_rec *r)
 
apr_port_t default_port (const request_rec *r)
 
int protocol_propose (conn_rec *c, request_rec *r, server_rec *s, const apr_array_header_t *offers, apr_array_header_t *proposals)
 
int protocol_switch (conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
 
const char * protocol_get (const conn_rec *c)
 
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)
 
const char * ap_select_protocol (conn_rec *c, request_rec *r, server_rec *s, const apr_array_header_t *choices)
 
apr_status_t ap_switch_protocol (conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
 
const char * ap_get_protocol (conn_rec *c)
 
int ap_is_allowed_protocol (conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
 
apr_bucketap_bucket_error_make (apr_bucket *b, int error, const char *buf, apr_pool_t *p)
 
apr_bucketap_bucket_error_create (int error, const char *buf, apr_pool_t *p, apr_bucket_alloc_t *list)
 
apr_status_t ap_byterange_filter (ap_filter_t *f, apr_bucket_brigade *b)
 
apr_status_t ap_http_header_filter (ap_filter_t *f, apr_bucket_brigade *b)
 
apr_status_t ap_content_length_filter (ap_filter_t *, apr_bucket_brigade *)
 
apr_status_t ap_old_write_filter (ap_filter_t *f, apr_bucket_brigade *b)
 
void ap_set_sub_req_protocol (request_rec *rnew, const request_rec *r)
 
void ap_finalize_sub_req_protocol (request_rec *sub_r)
 
void ap_send_interim_response (request_rec *r, int send_headers)
 

Variables

AP_DECLARE_DATA ap_filter_rec_tap_old_write_func
 
AP_DECLARE_DATA const
apr_bucket_type_t 
ap_bucket_type_error
 

Detailed Description

HTTP protocol handling.