Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove AP_MODE_INIT, it is a no-op, everywhere

  • Loading branch information...
commit 180125728959cf8412df0b603e08da770c7bb336 1 parent 7e5428e
Paul Querna pquerna authored
4 include/util_filter.h
@@ -56,10 +56,6 @@ typedef enum {
56 56 * Use this mode with extreme caution.
57 57 */
58 58 AP_MODE_EXHAUSTIVE,
59   - /** The filter should initialize the connection if needed,
60   - * NNTP or FTP over SSL for example.
61   - */
62   - AP_MODE_INIT
63 59 } ap_input_mode_t;
64 60
65 61 /**
3  modules/debugging/mod_dumpio.c
@@ -117,8 +117,7 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
117 117 (( mode ) == AP_MODE_GETLINE) ? "getline" : \
118 118 (( mode ) == AP_MODE_EATCRLF) ? "eatcrlf" : \
119 119 (( mode ) == AP_MODE_SPECULATIVE) ? "speculative" : \
120   - (( mode ) == AP_MODE_EXHAUSTIVE) ? "exhaustive" : \
121   - (( mode ) == AP_MODE_INIT) ? "init" : "unknown" \
  120 + (( mode ) == AP_MODE_EXHAUSTIVE) ? "exhaustive" : "unknown" \
122 121 )
123 122
124 123 static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
2  modules/filters/mod_reqtimeout.c
@@ -203,7 +203,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
203 203 if (rv != APR_SUCCESS)
204 204 goto out;
205 205
206   - if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
  206 + if (block == APR_NONBLOCK_READ
207 207 || mode == AP_MODE_EATCRLF) {
208 208 rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
209 209 if (ccfg->min_rate > 0 && rv == APR_SUCCESS) {
10 modules/ssl/ssl_engine_io.c
@@ -1265,7 +1265,6 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
1265 1265 bio_filter_in_ctx_t *inctx = f->ctx;
1266 1266 const char *start = inctx->buffer; /* start of block to return */
1267 1267 apr_size_t len = sizeof(inctx->buffer); /* length of block to return */
1268   - int is_init = (mode == AP_MODE_INIT);
1269 1268
1270 1269 if (f->c->aborted) {
1271 1270 /* 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,
1283 1282
1284 1283 /* XXX: we don't currently support anything other than these modes. */
1285 1284 if (mode != AP_MODE_READBYTES && mode != AP_MODE_GETLINE &&
1286   - mode != AP_MODE_SPECULATIVE && mode != AP_MODE_INIT) {
  1285 + mode != AP_MODE_SPECULATIVE) {
1287 1286 return APR_ENOTIMPL;
1288 1287 }
1289 1288
@@ -1299,13 +1298,6 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
1299 1298 return ssl_io_filter_error(f, bb, status);
1300 1299 }
1301 1300
1302   - if (is_init) {
1303   - /* protocol module needs to handshake before sending
1304   - * data to client (e.g. NNTP or FTP)
1305   - */
1306   - return APR_SUCCESS;
1307   - }
1308   -
1309 1301 if (inctx->mode == AP_MODE_READBYTES ||
1310 1302 inctx->mode == AP_MODE_SPECULATIVE) {
1311 1303 /* Protected from truncation, readbytes < MAX_SIZE_T
14 server/core_filters.c
@@ -89,20 +89,6 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
89 89 const char *str;
90 90 apr_size_t len;
91 91
92   - if (mode == AP_MODE_INIT) {
93   - /*
94   - * this mode is for filters that might need to 'initialize'
95   - * a connection before reading request data from a client.
96   - * NNTP over SSL for example needs to handshake before the
97   - * server sends the welcome message.
98   - * such filters would have changed the mode before this point
99   - * is reached. however, protocol modules such as NNTP should
100   - * not need to know anything about SSL. given the example, if
101   - * SSL is not in the filter chain, AP_MODE_INIT is a noop.
102   - */
103   - return APR_SUCCESS;
104   - }
105   -
106 92 if (!ctx)
107 93 {
108 94 ctx = apr_pcalloc(f->c->pool, sizeof(*ctx));

0 comments on commit 1801257

Please sign in to comment.
Something went wrong with that request. Please try again.