Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

http_core.c File Reference

#include "apr_strings.h"
#include "apr_thread_proc.h"
#include "apr_want.h"
#include "httpd.h"
#include "http_config.h"
#include "http_connection.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include "util_filter.h"
#include "util_ebcdic.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "mod_core.h"

Include dependency graph for http_core.c:

Go to the source code of this file.

Defines

#define APR_WANT_STRFUNC
#define CORE_PRIVATE
#define ASCII_CRLF   "\015\012"
#define ASCII_ZERO   "\060"

Functions

static const char * set_keep_alive_timeout (cmd_parms *cmd, void *dummy, const char *arg)
static const char * set_keep_alive (cmd_parms *cmd, void *dummy, const char *arg)
static const char * set_keep_alive_max (cmd_parms *cmd, void *dummy, const char *arg)
static apr_status_t chunk_filter (ap_filter_t *f, apr_bucket_brigade *b)
static const char * http_method (const request_rec *r)
static apr_port_t http_port (const request_rec *r)
static int ap_process_http_connection (conn_rec *c)
static int http_create_request (request_rec *r)
static void register_hooks (apr_pool_t *p)

Variables

AP_DECLARE_DATA ap_filter_rec_tap_http_input_filter_handle
AP_DECLARE_DATA ap_filter_rec_tap_http_header_filter_handle
AP_DECLARE_DATA ap_filter_rec_tap_chunk_filter_handle
AP_DECLARE_DATA ap_filter_rec_tap_byterange_filter_handle
static const command_rec http_cmds []
module AP_MODULE_DECLARE_DATA http_module


Define Documentation

#define APR_WANT_STRFUNC
 

Definition at line 20 of file http_core.c.

#define ASCII_CRLF   "\015\012"
 

Referenced by chunk_filter().

#define ASCII_ZERO   "\060"
 

Referenced by chunk_filter().

#define CORE_PRIVATE
 

Definition at line 23 of file http_core.c.


Function Documentation

static int ap_process_http_connection conn_rec c  )  [static]
 

Definition at line 232 of file http_core.c.

References conn_rec::aborted, AP_CONN_KEEPALIVE, AP_CONN_UNKNOWN, ap_extended_status, ap_get_module_config, ap_graceful_stop_signalled(), ap_process_request(), ap_read_request(), APR_INCOMPLETE_READ, apr_socket_opt_set(), conn_rec::conn_config, core_module, HTTP_OK, conn_rec::keepalive, NULL, OK, r, conn_rec::sbh, SERVER_BUSY_KEEPALIVE, SERVER_BUSY_READ, SERVER_BUSY_WRITE, and request_rec::status.

Referenced by register_hooks().

Here is the call graph for this function:

static apr_status_t chunk_filter ap_filter_t f,
apr_bucket_brigade b
[static]
 

Definition at line 101 of file http_core.c.

References ap_xlate_proto_to_ascii, APR_BLOCK_READ, APR_BRIGADE_FOREACH, APR_BRIGADE_INSERT_HEAD, APR_BRIGADE_INSERT_TAIL, APR_BUCKET_INSERT_BEFORE, APR_BUCKET_IS_EOS, APR_BUCKET_IS_FLUSH, APR_BUCKET_NEXT, apr_bucket_read, APR_SUCCESS, ASCII_CRLF, ASCII_ZERO, conn_rec::bucket_alloc, bytes, c, request_rec::connection, CRLF, e, eos, flush, len, ap_filter_t::next, NULL, and ap_filter_t::r.

Referenced by register_hooks().

static int http_create_request request_rec r  )  [static]
 

Definition at line 275 of file http_core.c.

References ap_byterange_filter_handle, ap_content_length_filter_handle, ap_http_header_filter_handle, request_rec::connection, request_rec::main, NULL, OK, and request_rec::prev.

Referenced by register_hooks().

static const char* http_method const request_rec r  )  [static]
 

Definition at line 226 of file http_core.c.

Referenced by register_hooks().

static apr_port_t http_port const request_rec r  )  [static]
 

Definition at line 229 of file http_core.c.

References DEFAULT_HTTP_PORT.

Referenced by register_hooks().

static void register_hooks apr_pool_t p  )  [static]
 

Definition at line 289 of file http_core.c.

References ap_byterange_filter_handle, ap_chunk_filter_handle, AP_FTYPE_PROTOCOL, AP_FTYPE_TRANSCODE, ap_http_filter(), ap_http_header_filter_handle, ap_http_input_filter_handle, ap_process_http_connection(), APR_HOOK_MIDDLE, APR_HOOK_REALLY_LAST, chunk_filter(), http_create_request(), http_method(), http_port(), and NULL.

Here is the call graph for this function:

static const char* set_keep_alive cmd_parms cmd,
void *  dummy,
const char *  arg
[static]
 

Definition at line 56 of file http_core.c.

References err, server_rec::keep_alive, NOT_IN_DIR_LOC_FILE, NOT_IN_LIMIT, NULL, cmd_parms_struct::server, and strcasecmp().

Here is the call graph for this function:

static const char* set_keep_alive_max cmd_parms cmd,
void *  dummy,
const char *  arg
[static]
 

Definition at line 76 of file http_core.c.

References err, server_rec::keep_alive_max, NOT_IN_DIR_LOC_FILE, NOT_IN_LIMIT, NULL, and cmd_parms_struct::server.

static const char* set_keep_alive_timeout cmd_parms cmd,
void *  dummy,
const char *  arg
[static]
 

Definition at line 44 of file http_core.c.

References apr_time_from_sec, err, server_rec::keep_alive_timeout, NOT_IN_DIR_LOC_FILE, NOT_IN_LIMIT, NULL, and cmd_parms_struct::server.


Variable Documentation

AP_DECLARE_DATA ap_filter_rec_t* ap_byterange_filter_handle
 

Definition at line 42 of file http_core.c.

Referenced by http_create_request(), and register_hooks().

AP_DECLARE_DATA ap_filter_rec_t* ap_chunk_filter_handle
 

Definition at line 41 of file http_core.c.

Referenced by register_hooks().

AP_DECLARE_DATA ap_filter_rec_t* ap_http_header_filter_handle
 

Definition at line 40 of file http_core.c.

Referenced by http_create_request(), and register_hooks().

AP_DECLARE_DATA ap_filter_rec_t* ap_http_input_filter_handle
 

Definition at line 39 of file http_core.c.

Referenced by ap_read_request(), and register_hooks().

const command_rec http_cmds[] [static]
 

Initial value:

 {
    AP_INIT_TAKE1("KeepAliveTimeout", set_keep_alive_timeout, NULL, RSRC_CONF,
                  "Keep-Alive timeout duration (sec)"),
    AP_INIT_TAKE1("MaxKeepAliveRequests", set_keep_alive_max, NULL, RSRC_CONF,
     "Maximum number of Keep-Alive requests per connection, or 0 for infinite"),
    AP_INIT_TAKE1("KeepAlive", set_keep_alive, NULL, RSRC_CONF,
                  "Whether persistent connections should be On or Off"),
    { NULL }
}

Definition at line 88 of file http_core.c.

module AP_MODULE_DECLARE_DATA http_module
 

Initial value:

Definition at line 312 of file http_core.c.