Apache HTTPD
Functions | Variables
h2_c1.c File Reference
#include <assert.h>
#include <apr_strings.h>
#include <ap_mpm.h>
#include <ap_mmn.h>
#include <httpd.h>
#include <http_core.h>
#include <http_config.h>
#include <http_log.h>
#include <http_connection.h>
#include <http_protocol.h>
#include <http_request.h>
#include <http_ssl.h>
#include <mpm_common.h>
#include "h2_private.h"
#include "h2.h"
#include "h2_bucket_beam.h"
#include "h2_config.h"
#include "h2_conn_ctx.h"
#include "h2_mplx.h"
#include "h2_session.h"
#include "h2_stream.h"
#include "h2_protocol.h"
#include "h2_workers.h"
#include "h2_c1.h"
#include "h2_version.h"
#include "h2_util.h"

Go to the source code of this file.

Functions

apr_status_t h2_c1_child_init (apr_pool_t *pool, server_rec *s)
 
void h2_c1_child_stopping (apr_pool_t *pool, int graceful)
 
apr_status_t h2_c1_setup (conn_rec *c, request_rec *r, server_rec *s)
 
apr_status_t h2_c1_run (conn_rec *c)
 
apr_status_t h2_c1_pre_close (struct h2_conn_ctx_t *ctx, conn_rec *c)
 
int h2_c1_allows_direct (conn_rec *c)
 
int h2_c1_can_upgrade (request_rec *r)
 
static int h2_c1_hook_process_connection (conn_rec *c)
 
static int h2_c1_hook_pre_close (conn_rec *c)
 
void h2_c1_register_hooks (void)
 

Variables

static struct h2_workersworkers
 
static int async_mpm
 
apr_OFN_ap_logio_add_bytes_in_th2_c_logio_add_bytes_in
 
apr_OFN_ap_logio_add_bytes_out_th2_c_logio_add_bytes_out
 
static const char *const mod_ssl [] = { "mod_ssl.c", NULL}
 
static const char *const mod_reqtimeout [] = { "mod_ssl.c", "mod_reqtimeout.c", NULL}
 

Function Documentation

◆ h2_c1_allows_direct()

int h2_c1_allows_direct ( conn_rec c)

Check if the connection allows a direct detection of HTTPP/2, as configurable by the H2Direct directive.

Parameters
cthe connection to check on
Returns
!= 0 if direct detection is enabled

Definition at line 186 of file h2_c1.c.

◆ h2_c1_can_upgrade()

int h2_c1_can_upgrade ( request_rec r)

Check if the "Upgrade" HTTP/1.1 mode of protocol switching is enabled for the given request.

Parameters
rthe request to check
Returns
!= 0 iff Upgrade switching is enabled

Definition at line 201 of file h2_c1.c.

◆ h2_c1_child_init()

apr_status_t h2_c1_child_init ( apr_pool_t pool,
server_rec s 
)

Definition at line 55 of file h2_c1.c.

◆ h2_c1_child_stopping()

void h2_c1_child_stopping ( apr_pool_t pool,
int  graceful 
)

Child is about to be stopped, release unused resources

Definition at line 79 of file h2_c1.c.

◆ h2_c1_hook_pre_close()

static int h2_c1_hook_pre_close ( conn_rec c)
static

< Module declines to handle

< Module declines to handle

Definition at line 286 of file h2_c1.c.

◆ h2_c1_hook_process_connection()

static int h2_c1_hook_process_connection ( conn_rec c)
static

< Module declines to handle

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

Definition at line 210 of file h2_c1.c.

◆ h2_c1_pre_close()

apr_status_t h2_c1_pre_close ( struct h2_conn_ctx_t ctx,
conn_rec c 
)

The primary connection is about to close. If we have not send a GOAWAY yet, this is the last chance.

< Module has served the response completely * - it's safe to die() with no more output

< Module has served the response completely * - it's safe to die() with no more output

Definition at line 175 of file h2_c1.c.

◆ h2_c1_register_hooks()

void h2_c1_register_hooks ( void  )

Definition at line 308 of file h2_c1.c.

◆ h2_c1_run()

apr_status_t h2_c1_run ( conn_rec c)

Run the HTTP/2 primary connection in synchronous fashion. Return when the HTTP/2 session is done and the connection will close or a fatal error occurred.

Parameters
cthe http2 connection to run
Returns
APR_SUCCESS when session is done.

Definition at line 116 of file h2_c1.c.

◆ h2_c1_setup()

apr_status_t h2_c1_setup ( conn_rec c,
request_rec r,
server_rec s 
)

Setup the primary connection and our context for HTTP/2 processing

Parameters
cthe connection HTTP/2 is starting on
rthe upgrade request that still awaits an answer, optional
sthe server selected for this connection (can be != c->base_server)

Definition at line 87 of file h2_c1.c.

Variable Documentation

◆ async_mpm

int async_mpm
static

Definition at line 50 of file h2_c1.c.

◆ h2_c_logio_add_bytes_in

apr_OFN_ap_logio_add_bytes_in_t* h2_c_logio_add_bytes_in

Definition at line 52 of file h2_c1.c.

◆ h2_c_logio_add_bytes_out

apr_OFN_ap_logio_add_bytes_out_t* h2_c_logio_add_bytes_out

Definition at line 53 of file h2_c1.c.

◆ mod_reqtimeout

const char* const mod_reqtimeout[] = { "mod_ssl.c", "mod_reqtimeout.c", NULL}
static

Definition at line 306 of file h2_c1.c.

◆ mod_ssl

const char* const mod_ssl[] = { "mod_ssl.c", NULL}
static

Definition at line 305 of file h2_c1.c.

◆ workers

struct h2_workers* workers
static

Definition at line 48 of file h2_c1.c.