From 662e165b4a054048c55a3722fbee8dbca475e564 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sun, 22 Oct 2000 13:09:23 +0000 Subject: [PATCH] namespace-protect dechunk_filter and http_filter git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86699 13f79535-47bb-0310-9956-ffa450edef68 --- include/http_protocol.h | 4 ++-- modules/http/http_core.c | 4 ++-- modules/http/http_protocol.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/http_protocol.h b/include/http_protocol.h index 8ae6932ffe..8037a0621b 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -531,8 +531,8 @@ AP_DECLARE(int) ap_method_number_of(const char *method); */ AP_DECLARE(const char *) ap_method_name_of(int methnum); -apr_status_t http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode); -apr_status_t dechunk_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode); +apr_status_t ap_http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode); +apr_status_t ap_dechunk_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode); /* Hooks */ /* diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 77f1c9bf0b..368ed40f55 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -3576,8 +3576,8 @@ static void register_hooks(void) * filters */ ap_hook_insert_filter(core_insert_filter, NULL, NULL, AP_HOOK_MIDDLE); - ap_register_input_filter("HTTP_IN", http_filter, AP_FTYPE_CONNECTION); - ap_register_input_filter("DECHUNK", dechunk_filter, AP_FTYPE_CONNECTION + 1); + ap_register_input_filter("HTTP_IN", ap_http_filter, AP_FTYPE_CONNECTION); + ap_register_input_filter("DECHUNK", ap_dechunk_filter, AP_FTYPE_CONNECTION + 1); ap_register_input_filter("CORE_IN", core_input_filter, AP_FTYPE_CONNECTION); ap_register_output_filter("HTTP_HEADER", ap_http_header_filter, AP_FTYPE_CONTENT + 1); ap_register_output_filter("CORE", core_output_filter, AP_FTYPE_CONNECTION + 1); diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index e3cb35a68a..05a6150e82 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -849,8 +849,8 @@ struct dechunk_ctx { static long get_chunk_size(char *); static int getline(char *s, int n, request_rec *r, int fold); -apr_status_t dechunk_filter(ap_filter_t *f, ap_bucket_brigade *bb, - ap_input_mode_t mode) +apr_status_t ap_dechunk_filter(ap_filter_t *f, ap_bucket_brigade *bb, + ap_input_mode_t mode) { apr_status_t rv; struct dechunk_ctx *ctx = f->ctx; @@ -865,7 +865,7 @@ apr_status_t dechunk_filter(ap_filter_t *f, ap_bucket_brigade *bb, do { if (ctx->chunk_size == ctx->bytes_delivered) { - /* Time to read another chunk header or trailer... http_filter() is + /* Time to read another chunk header or trailer... ap_http_filter() is * the next filter in line and it knows how to return a brigade with * one line. */ @@ -905,13 +905,13 @@ apr_status_t dechunk_filter(ap_filter_t *f, ap_bucket_brigade *bb, } while (ctx->state != WANT_BODY); if (ctx->state == WANT_BODY) { - /* Tell http_filter() how many bytes to deliver. */ + /* Tell ap_http_filter() how many bytes to deliver. */ f->c->remain = ctx->chunk_size - ctx->bytes_delivered; if ((rv = ap_get_brigade(f->next, bb, mode)) != APR_SUCCESS) { return rv; } /* Walk through the body, accounting for bytes, and removing an eos bucket if - * http_filter() delivered the entire chunk. + * ap_http_filter() delivered the entire chunk. */ b = AP_BRIGADE_FIRST(bb); while (b != AP_BRIGADE_SENTINEL(bb) && !AP_BUCKET_IS_EOS(b)) { @@ -935,7 +935,7 @@ typedef struct http_filter_ctx { ap_bucket_brigade *b; } http_ctx_t; -apr_status_t http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode) +apr_status_t ap_http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_t mode) { #define ASCII_LF '\012' ap_bucket *e; -- 2.50.1