mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Fix some style issues on files that can easily be synch'ed with 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -137,8 +137,9 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* eliminate the '.' if there is one */
|
/* eliminate the '.' if there is one */
|
||||||
if (*ext == '.')
|
if (*ext == '.') {
|
||||||
++ext;
|
++ext;
|
||||||
|
}
|
||||||
|
|
||||||
/* check if we have a registered command for the extension*/
|
/* check if we have a registered command for the extension*/
|
||||||
new_cmd = apr_table_get(d->file_type_handlers, ext);
|
new_cmd = apr_table_get(d->file_type_handlers, ext);
|
||||||
@@ -154,9 +155,10 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
|
|||||||
*cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
|
*cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
|
||||||
|
|
||||||
/* Run in its own address space if specified */
|
/* Run in its own address space if specified */
|
||||||
if(apr_table_get(d->file_handler_mode, ext))
|
if (apr_table_get(d->file_handler_mode, ext)) {
|
||||||
e_info->addrspace = 1;
|
e_info->addrspace = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Tokenize the full command string into its arguments */
|
/* Tokenize the full command string into its arguments */
|
||||||
apr_tokenize_to_argv(*cmd, (char***)argv, p);
|
apr_tokenize_to_argv(*cmd, (char***)argv, p);
|
||||||
|
@@ -52,7 +52,8 @@ typedef struct buffer_ctx {
|
|||||||
/**
|
/**
|
||||||
* Buffer buckets being written to the output filter stack.
|
* Buffer buckets being written to the output filter stack.
|
||||||
*/
|
*/
|
||||||
static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
|
static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
|
||||||
|
{
|
||||||
apr_bucket *e;
|
apr_bucket *e;
|
||||||
request_rec *r = f->r;
|
request_rec *r = f->r;
|
||||||
buffer_ctx *ctx = f->ctx;
|
buffer_ctx *ctx = f->ctx;
|
||||||
@@ -74,7 +75,6 @@ static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
|
|||||||
ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
|
ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
|
||||||
ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
|
ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
|
||||||
ctx->conf = ap_get_module_config(f->r->per_dir_config, &buffer_module);
|
ctx->conf = ap_get_module_config(f->r->per_dir_config, &buffer_module);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do nothing if asked to filter nothing. */
|
/* Do nothing if asked to filter nothing. */
|
||||||
@@ -187,7 +187,8 @@ static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
|
|||||||
* Buffer buckets being read from the input filter stack.
|
* Buffer buckets being read from the input filter stack.
|
||||||
*/
|
*/
|
||||||
static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
|
static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
|
||||||
ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) {
|
ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
|
||||||
|
{
|
||||||
apr_bucket *e, *after;
|
apr_bucket *e, *after;
|
||||||
apr_status_t rv;
|
apr_status_t rv;
|
||||||
buffer_ctx *ctx = f->ctx;
|
buffer_ctx *ctx = f->ctx;
|
||||||
@@ -294,7 +295,8 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
|
|||||||
return APR_SUCCESS;
|
return APR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_buffer_config(apr_pool_t *p, char *dummy) {
|
static void *create_buffer_config(apr_pool_t *p, char *dummy)
|
||||||
|
{
|
||||||
buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
|
buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
|
||||||
|
|
||||||
new->size_set = 0; /* unset */
|
new->size_set = 0; /* unset */
|
||||||
@@ -303,7 +305,8 @@ static void *create_buffer_config(apr_pool_t *p, char *dummy) {
|
|||||||
return (void *) new;
|
return (void *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv) {
|
static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv)
|
||||||
|
{
|
||||||
buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
|
buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
|
||||||
buffer_conf *add = (buffer_conf *) addv;
|
buffer_conf *add = (buffer_conf *) addv;
|
||||||
buffer_conf *base = (buffer_conf *) basev;
|
buffer_conf *base = (buffer_conf *) basev;
|
||||||
@@ -314,7 +317,8 @@ static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv) {
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *set_buffer_size(cmd_parms *cmd, void *dconf, const char *arg) {
|
static const char *set_buffer_size(cmd_parms *cmd, void *dconf, const char *arg)
|
||||||
|
{
|
||||||
buffer_conf *conf = dconf;
|
buffer_conf *conf = dconf;
|
||||||
|
|
||||||
if (APR_SUCCESS != apr_strtoff(&(conf->size), arg, NULL, 10) || conf->size
|
if (APR_SUCCESS != apr_strtoff(&(conf->size), arg, NULL, 10) || conf->size
|
||||||
@@ -330,7 +334,8 @@ static const command_rec buffer_cmds[] = { AP_INIT_TAKE1("BufferSize",
|
|||||||
set_buffer_size, NULL, ACCESS_CONF,
|
set_buffer_size, NULL, ACCESS_CONF,
|
||||||
"Maximum size of the buffer used by the buffer filter"), { NULL } };
|
"Maximum size of the buffer used by the buffer filter"), { NULL } };
|
||||||
|
|
||||||
static void register_hooks(apr_pool_t *p) {
|
static void register_hooks(apr_pool_t *p)
|
||||||
|
{
|
||||||
ap_register_output_filter(bufferFilterName, buffer_out_filter, NULL,
|
ap_register_output_filter(bufferFilterName, buffer_out_filter, NULL,
|
||||||
AP_FTYPE_CONTENT_SET);
|
AP_FTYPE_CONTENT_SET);
|
||||||
ap_register_input_filter(bufferFilterName, buffer_in_filter, NULL,
|
ap_register_input_filter(bufferFilterName, buffer_in_filter, NULL,
|
||||||
|
@@ -479,7 +479,8 @@ static void *reqtimeout_merge_srv_config(apr_pool_t *p, void *base_, void *add_)
|
|||||||
return cfg;
|
return cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *parse_int(apr_pool_t *p, const char *arg, int *val) {
|
static const char *parse_int(apr_pool_t *p, const char *arg, int *val)
|
||||||
|
{
|
||||||
char *endptr;
|
char *endptr;
|
||||||
*val = strtol(arg, &endptr, 10);
|
*val = strtol(arg, &endptr, 10);
|
||||||
|
|
||||||
|
@@ -178,7 +178,8 @@ typedef struct kept_body_filter_ctx {
|
|||||||
* been removed from the body during storage. We need to change the request
|
* been removed from the body during storage. We need to change the request
|
||||||
* from Transfer-Encoding: chunked to an explicit Content-Length.
|
* from Transfer-Encoding: chunked to an explicit Content-Length.
|
||||||
*/
|
*/
|
||||||
static int kept_body_filter_init(ap_filter_t *f) {
|
static int kept_body_filter_init(ap_filter_t *f)
|
||||||
|
{
|
||||||
apr_off_t length = 0;
|
apr_off_t length = 0;
|
||||||
request_rec *r = f->r;
|
request_rec *r = f->r;
|
||||||
apr_bucket_brigade *kept_body = r->kept_body;
|
apr_bucket_brigade *kept_body = r->kept_body;
|
||||||
|
@@ -141,7 +141,8 @@ static int cfg_directory(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static int cfg_root(lua_State *L) {
|
/*static int cfg_root(lua_State *L)
|
||||||
|
{
|
||||||
ap_lua_dir_cfg *cfg = check_dir_config(L, 1);
|
ap_lua_dir_cfg *cfg = check_dir_config(L, 1);
|
||||||
lua_pushstring(L, cfg->root_path);
|
lua_pushstring(L, cfg->root_path);
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user