Apache HTTPD
Classes | Macros | Enumerations | Functions | Variables
mod_proxy_scgi.c File Reference
#include "apr_strings.h"
#include "ap_hooks.h"
#include "apr_optional_hooks.h"
#include "apr_buckets.h"
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"
#include "util_script.h"
#include "mod_proxy.h"
#include "scgi.h"

Go to the source code of this file.

Classes

struct  scgi_request_config
 
struct  scgi_config
 
struct  socket_ex_data
 

Macros

#define APR_WANT_MEMFUNC
 
#define APR_WANT_STRFUNC
 
#define SCHEME   "scgi"
 
#define PROXY_FUNCTION   "SCGI"
 
#define SCGI_MAGIC   "SCGI"
 
#define SCGI_PROTOCOL_VERSION   "1"
 
#define CONTENT_LENGTH   "CONTENT_LENGTH"
 
#define GATEWAY_INTERFACE   "GATEWAY_INTERFACE"
 

Enumerations

enum  scgi_request_type { scgi_internal_redirect , scgi_sendfile }
 

Functions

static apr_bucketbucket_socket_ex_create (socket_ex_data *data, apr_bucket_alloc_t *list)
 
static apr_status_t bucket_socket_ex_read (apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block)
 
static apr_bucketbucket_socket_ex_make (apr_bucket *b, socket_ex_data *data)
 
static int scgi_canon (request_rec *r, char *url)
 
static int sendall (proxy_conn_rec *conn, const char *buf, apr_size_t length, request_rec *r)
 
static int send_headers (request_rec *r, proxy_conn_rec *conn)
 
static int send_request_body (request_rec *r, proxy_conn_rec *conn)
 
static int pass_response (request_rec *r, proxy_conn_rec *conn)
 
static int scgi_request_status (int *status, request_rec *r)
 
static int scgi_handler (request_rec *r, proxy_worker *worker, proxy_server_conf *conf, char *url, const char *proxyname, apr_port_t proxyport)
 
static void * create_scgi_config (apr_pool_t *p, char *dummy)
 
static void * merge_scgi_config (apr_pool_t *p, void *base_, void *add_)
 
static const charscgi_set_send_file (cmd_parms *cmd, void *mconfig, const char *arg)
 
static const charscgi_set_internal_redirect (cmd_parms *cmd, void *mconfig, const char *arg)
 
static void register_hooks (apr_pool_t *p)
 

Variables

const charscgi_sendfile_off = "off"
 
const charscgi_sendfile_on = "X-Sendfile"
 
const charscgi_internal_redirect_off = "off"
 
const charscgi_internal_redirect_on = "Location"
 
static const apr_bucket_type_t bucket_type_socket_ex
 
static const command_rec scgi_cmds []
 
static int *const aplog_module_index = &( proxy_scgi_module.module_index)
 

Macro Definition Documentation

◆ APR_WANT_MEMFUNC

#define APR_WANT_MEMFUNC

Definition at line 25 of file mod_proxy_scgi.c.

◆ APR_WANT_STRFUNC

#define APR_WANT_STRFUNC

Definition at line 26 of file mod_proxy_scgi.c.

◆ CONTENT_LENGTH

#define CONTENT_LENGTH   "CONTENT_LENGTH"

Definition at line 49 of file mod_proxy_scgi.c.

◆ GATEWAY_INTERFACE

#define GATEWAY_INTERFACE   "GATEWAY_INTERFACE"

Definition at line 50 of file mod_proxy_scgi.c.

◆ PROXY_FUNCTION

#define PROXY_FUNCTION   "SCGI"

Definition at line 44 of file mod_proxy_scgi.c.

◆ SCGI_MAGIC

#define SCGI_MAGIC   "SCGI"

Definition at line 45 of file mod_proxy_scgi.c.

◆ SCGI_PROTOCOL_VERSION

#define SCGI_PROTOCOL_VERSION   "1"

Definition at line 46 of file mod_proxy_scgi.c.

◆ SCHEME

#define SCHEME   "scgi"

Definition at line 43 of file mod_proxy_scgi.c.

Enumeration Type Documentation

◆ scgi_request_type

Enumerator
scgi_internal_redirect 
scgi_sendfile 

Definition at line 55 of file mod_proxy_scgi.c.

Function Documentation

◆ bucket_socket_ex_create()

static apr_bucket * bucket_socket_ex_create ( socket_ex_data data,
apr_bucket_alloc_t list 
)
static

Definition at line 162 of file mod_proxy_scgi.c.

◆ bucket_socket_ex_make()

static apr_bucket * bucket_socket_ex_make ( apr_bucket b,
socket_ex_data data 
)
static

Definition at line 153 of file mod_proxy_scgi.c.

◆ bucket_socket_ex_read()

static apr_status_t bucket_socket_ex_read ( apr_bucket a,
const char **  str,
apr_size_t len,
apr_read_type_e  block 
)
static

Definition at line 93 of file mod_proxy_scgi.c.

◆ create_scgi_config()

static void * create_scgi_config ( apr_pool_t p,
char dummy 
)
static

Definition at line 595 of file mod_proxy_scgi.c.

◆ merge_scgi_config()

static void * merge_scgi_config ( apr_pool_t p,
void *  base_,
void *  add_ 
)
static

Definition at line 606 of file mod_proxy_scgi.c.

◆ pass_response()

static int pass_response ( request_rec r,
proxy_conn_rec conn 
)
static

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

Definition at line 363 of file mod_proxy_scgi.c.

◆ register_hooks()

static void register_hooks ( apr_pool_t p)
static

Definition at line 667 of file mod_proxy_scgi.c.

◆ scgi_canon()

static int scgi_canon ( request_rec r,
char url 
)
static

< Module declines to handle

< Module has handled this stage.

Definition at line 177 of file mod_proxy_scgi.c.

◆ scgi_handler()

static int scgi_handler ( request_rec r,
proxy_worker worker,
proxy_server_conf conf,
char url,
const char proxyname,
apr_port_t  proxyport 
)
static

< Module declines to handle

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

Definition at line 536 of file mod_proxy_scgi.c.

◆ scgi_request_status()

static int scgi_request_status ( int status,
request_rec r 
)
static

< Module has handled this stage.

RFC 2616: HTTP

RFC 2616: HTTP

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

Definition at line 474 of file mod_proxy_scgi.c.

◆ scgi_set_internal_redirect()

static const char * scgi_set_internal_redirect ( cmd_parms cmd,
void *  mconfig,
const char arg 
)
static

Definition at line 636 of file mod_proxy_scgi.c.

◆ scgi_set_send_file()

static const char * scgi_set_send_file ( cmd_parms cmd,
void *  mconfig,
const char arg 
)
static

Definition at line 618 of file mod_proxy_scgi.c.

◆ send_headers()

static int send_headers ( request_rec r,
proxy_conn_rec conn 
)
static

Definition at line 258 of file mod_proxy_scgi.c.

◆ send_request_body()

static int send_request_body ( request_rec r,
proxy_conn_rec conn 
)
static

< Module has handled this stage.

< Module has handled this stage.

Definition at line 334 of file mod_proxy_scgi.c.

◆ sendall()

static int sendall ( proxy_conn_rec conn,
const char buf,
apr_size_t  length,
request_rec r 
)
static

< Module has handled this stage.

Definition at line 230 of file mod_proxy_scgi.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( proxy_scgi_module.module_index)
static

Definition at line 676 of file mod_proxy_scgi.c.

◆ bucket_type_socket_ex

const apr_bucket_type_t bucket_type_socket_ex
static
Initial value:
= {
"SOCKET_EX", 5, APR_BUCKET_DATA,
}
apr_size_t size
static apr_status_t bucket_socket_ex_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block)

Definition at line 144 of file mod_proxy_scgi.c.

◆ scgi_cmds

const command_rec scgi_cmds[]
static
Initial value:
=
{
{ "ProxySCGISendfile" , scgi_set_send_file , NULL , 128 | 64 , TAKE1, "The name of the X-Sendfile pseudo response header or " "On or Off" },
{ "ProxySCGIInternalRedirect" , scgi_set_internal_redirect , NULL , 128 | 64 , TAKE1, "The name of the pseudo response header or On or Off" },
{NULL}
}
@ TAKE1
Definition http_config.h:51
static const char * scgi_set_send_file(cmd_parms *cmd, void *mconfig, const char *arg)
static const char * scgi_set_internal_redirect(cmd_parms *cmd, void *mconfig, const char *arg)
return NULL
Definition mod_so.c:359

Definition at line 654 of file mod_proxy_scgi.c.

◆ scgi_internal_redirect_off

const char* scgi_internal_redirect_off = "off"

Definition at line 67 of file mod_proxy_scgi.c.

◆ scgi_internal_redirect_on

const char* scgi_internal_redirect_on = "Location"

Definition at line 68 of file mod_proxy_scgi.c.

◆ scgi_sendfile_off

const char* scgi_sendfile_off = "off"

Definition at line 65 of file mod_proxy_scgi.c.

◆ scgi_sendfile_on

const char* scgi_sendfile_on = "X-Sendfile"

Definition at line 66 of file mod_proxy_scgi.c.