summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2011-11-10 22:55:06 +0000
committerPaul Querna <pquerna@apache.org>2011-11-10 22:55:06 +0000
commit548f0febab425538dd0a5f7c20255778f8db2e92 (patch)
tree41545ac4a411369d185dc2ea291e2a277aa46561
parente1935d046c0472ca48153da77f2929f4ba20e977 (diff)
downloadhttpd-input-filter-dev.tar.gz
Remove AP_MODE_INIT, it is a no-op, everywhereinput-filter-dev
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/input-filter-dev@1200612 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/util_filter.h4
-rw-r--r--modules/debugging/mod_dumpio.c3
-rw-r--r--modules/filters/mod_reqtimeout.c2
-rw-r--r--modules/ssl/ssl_engine_io.c10
-rw-r--r--server/core_filters.c14
5 files changed, 3 insertions, 30 deletions
diff --git a/include/util_filter.h b/include/util_filter.h
index a09c532576..c886dd254c 100644
--- a/include/util_filter.h
+++ b/include/util_filter.h
@@ -56,10 +56,6 @@ typedef enum {
* Use this mode with extreme caution.
*/
AP_MODE_EXHAUSTIVE,
- /** The filter should initialize the connection if needed,
- * NNTP or FTP over SSL for example.
- */
- AP_MODE_INIT
} ap_input_mode_t;
/**
diff --git a/modules/debugging/mod_dumpio.c b/modules/debugging/mod_dumpio.c
index e15932db55..d0cdfe02e4 100644
--- a/modules/debugging/mod_dumpio.c
+++ b/modules/debugging/mod_dumpio.c
@@ -117,8 +117,7 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
(( mode ) == AP_MODE_GETLINE) ? "getline" : \
(( mode ) == AP_MODE_EATCRLF) ? "eatcrlf" : \
(( mode ) == AP_MODE_SPECULATIVE) ? "speculative" : \
- (( mode ) == AP_MODE_EXHAUSTIVE) ? "exhaustive" : \
- (( mode ) == AP_MODE_INIT) ? "init" : "unknown" \
+ (( mode ) == AP_MODE_EXHAUSTIVE) ? "exhaustive" : "unknown" \
)
static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c
index 800bb6b4a9..da1410e2ca 100644
--- a/modules/filters/mod_reqtimeout.c
+++ b/modules/filters/mod_reqtimeout.c
@@ -203,7 +203,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
if (rv != APR_SUCCESS)
goto out;
- if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
+ if (block == APR_NONBLOCK_READ
|| mode == AP_MODE_EATCRLF) {
rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
if (ccfg->min_rate > 0 && rv == APR_SUCCESS) {
diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
index 45e2ca42a4..54fcfe590f 100644
--- a/modules/ssl/ssl_engine_io.c
+++ b/modules/ssl/ssl_engine_io.c
@@ -1265,7 +1265,6 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
bio_filter_in_ctx_t *inctx = f->ctx;
const char *start = inctx->buffer; /* start of block to return */
apr_size_t len = sizeof(inctx->buffer); /* length of block to return */
- int is_init = (mode == AP_MODE_INIT);
if (f->c->aborted) {
/* XXX: Ok, if we aborted, we ARE at the EOS. We also have
@@ -1283,7 +1282,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
/* XXX: we don't currently support anything other than these modes. */
if (mode != AP_MODE_READBYTES && mode != AP_MODE_GETLINE &&
- mode != AP_MODE_SPECULATIVE && mode != AP_MODE_INIT) {
+ mode != AP_MODE_SPECULATIVE) {
return APR_ENOTIMPL;
}
@@ -1299,13 +1298,6 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
return ssl_io_filter_error(f, bb, status);
}
- if (is_init) {
- /* protocol module needs to handshake before sending
- * data to client (e.g. NNTP or FTP)
- */
- return APR_SUCCESS;
- }
-
if (inctx->mode == AP_MODE_READBYTES ||
inctx->mode == AP_MODE_SPECULATIVE) {
/* Protected from truncation, readbytes < MAX_SIZE_T
diff --git a/server/core_filters.c b/server/core_filters.c
index 24f1f1f38f..80a13937ca 100644
--- a/server/core_filters.c
+++ b/server/core_filters.c
@@ -89,20 +89,6 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
const char *str;
apr_size_t len;
- if (mode == AP_MODE_INIT) {
- /*
- * this mode is for filters that might need to 'initialize'
- * a connection before reading request data from a client.
- * NNTP over SSL for example needs to handshake before the
- * server sends the welcome message.
- * such filters would have changed the mode before this point
- * is reached. however, protocol modules such as NNTP should
- * not need to know anything about SSL. given the example, if
- * SSL is not in the filter chain, AP_MODE_INIT is a noop.
- */
- return APR_SUCCESS;
- }
-
if (!ctx)
{
ctx = apr_pcalloc(f->c->pool, sizeof(*ctx));