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

util_script.c File Reference

#include "apr.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_want.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_main.h"
#include "http_log.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include "util_script.h"
#include "apr_date.h"
#include "util_ebcdic.h"

Include dependency graph for util_script.c:

Go to the source code of this file.

Defines

#define APR_WANT_STRFUNC
#define CORE_PRIVATE
#define MALFORMED_MESSAGE   "malformed header from script. Bad header="
#define MALFORMED_HEADER_LENGTH_TO_SHOW   30

Functions

static char * http2env (apr_pool_t *a, const char *w)
 AP_DECLARE (char **)
 AP_DECLARE (void)
 AP_DECLARE (int)
static char * original_uri (request_rec *r)
static int set_cookie_doo_doo (void *v, const char *key, const char *val)
 AP_DECLARE (ap_scan_script_header_err_core(request_rec int)
static int getsfunc_FILE (char *buf, int len, void *f)
static int getsfunc_BRIGADE (char *buf, int len, void *arg)
static int getsfunc_STRING (char *w, int len, void *pvastrs)
 AP_DECLARE_NONSTD (int)


Define Documentation

#define APR_WANT_STRFUNC
 

Definition at line 21 of file util_script.c.

#define CORE_PRIVATE
 

Definition at line 28 of file util_script.c.

#define MALFORMED_HEADER_LENGTH_TO_SHOW   30
 

Definition at line 54 of file util_script.c.

Referenced by AP_DECLARE().

#define MALFORMED_MESSAGE   "malformed header from script. Bad header="
 

Definition at line 53 of file util_script.c.

Referenced by AP_DECLARE().


Function Documentation

AP_DECLARE ap_scan_script_header_err_core(request_rec  int  ) 
 

Definition at line 397 of file util_script.c.

References AP_DECLARE, APLOG_ERR, APLOG_MARK, APLOG_TOCLIENT, apr_isprint, apr_isspace, APR_OVERLAP_TABLES_MERGE, CR, getsfunc, HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, inbytes_left, M_GET, MALFORMED_HEADER_LENGTH_TO_SHOW, MALFORMED_MESSAGE, MAX_STRING_LEN, NULL, OK, outbytes_left, p, set_cookie_doo_doo(), strcasecmp(), and x.

Here is the call graph for this function:

AP_DECLARE int   ) 
 

Get XML post data and parse it

Parameters:
r The current request
pdoc The XML post data
Returns:
HTTP status code int ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc)

Definition at line 287 of file util_script.c.

References AP_DECLARE.

AP_DECLARE void   ) 
 

Generic accessors for other modules to set at their own module-specific data

Parameters:
conf_vector The vector in which the modules configuration is stored. usually r->per_dir_config or s->module_config
m The module to set the data for.
val The module-specific data to set void ap_set_module_config(ap_conf_vector_t *cv, const module *m, void *val)

Definition at line 119 of file util_script.c.

References AP_DECLARE, APR_OVERLAP_TABLES_SET, c, e, apr_array_header_t::elts, hdrs, host, http2env(), apr_table_entry_t::key, key, nelts, apr_array_header_t::nelts, NULL, request_rec::prev, conn_rec::remote_addr, REMOTE_HOST, conn_rec::remote_ip, s, server_rec::server_admin, strcasecmp(), request_rec::user, apr_table_entry_t::val, and val.

Here is the call graph for this function:

AP_DECLARE char **   ) 
 

Definition at line 81 of file util_script.c.

References AP_DECLARE, apr_isalnum, apr_isdigit, apr_array_header_t::elts, env, key, nelts, apr_array_header_t::nelts, NULL, and val.

AP_DECLARE_NONSTD int   ) 
 

Read headers strings from a script, ensuring that the output is valid. If the output is valid, then the headers are added to the headers out of the current request

Parameters:
r The current request
buffer Empty when calling the function. On output, if there was an error, the string that cause the error is stored here.
termch Pointer to the last character parsed.
termarg Pointer to an int to capture the last argument parsed.
args String arguments to parse consecutively for headers, a NULL argument terminates the list.
Returns:
HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise int ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc)(char *, int, void *), void *getsfunc_data)

Definition at line 686 of file util_script.c.

References AP_DECLARE_NONSTD, vastrs::arg, vastrs::args, b, header_struct::bb, CRLF, vastrs::curpos, DECLINED, DONE, form_header_field(), getsfunc_STRING(), h, M_TRACE, NULL, header_struct::pool, and REQUEST_NO_BODY.

Here is the call graph for this function:

static int getsfunc_BRIGADE char *  buf,
int  len,
void *  arg
[static]
 

Definition at line 596 of file util_script.c.

References APR_BLOCK_READ, APR_BRIGADE_FIRST, apr_bucket_destroy, APR_BUCKET_IS_EOS, APR_BUCKET_NEXT, apr_bucket_read, APR_BUCKET_REMOVE, apr_bucket_split, APR_STATUS_IS_SUCCESS, bb, done, and src.

static int getsfunc_FILE char *  buf,
int  len,
void *  f
[static]
 

Definition at line 585 of file util_script.c.

References APR_SUCCESS.

static int getsfunc_STRING char *  w,
int  len,
void *  pvastrs
[static]
 

Definition at line 654 of file util_script.c.

References ap_strchr_c, vastrs::arg, vastrs::args, vastrs::curpos, p, and t.

Referenced by AP_DECLARE_NONSTD().

static char* http2env apr_pool_t a,
const char *  w
[static]
 

Definition at line 56 of file util_script.c.

References apr_isalnum, apr_toupper, and c.

Referenced by AP_DECLARE().

static char* original_uri request_rec r  )  [static]
 

Definition at line 307 of file util_script.c.

References apr_isspace, apr_pcalloc, first, last, NULL, request_rec::pool, and request_rec::the_request.

static int set_cookie_doo_doo void *  v,
const char *  key,
const char *  val
[static]
 

Definition at line 391 of file util_script.c.