Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) Event MPM: Add support for running under mod_ssl, by reverting to the
+ Worker MPM behaviors, when run under an input filter that buffers
+ its own data. [Paul Querna]
+
*) mod_ssl: Add support for caching SSL Sessions in memcached. [Paul Querna]
*) SECURITY: CVE-2007-1862 (cve.mitre.org)
int data_in_input_filters;
/** Is there data pending in the output filters? */
int data_in_output_filters;
+
+ /** Are there any filters that clogg/buffer the input stream, breaking
+ * the event mpm.
+ */
+ int clogging_input_filters;
};
/**
return DEFAULT_HTTP_PORT;
}
+static int ap_process_http_connection(conn_rec *c);
+
static int ap_process_http_async_connection(conn_rec *c)
{
request_rec *r;
conn_state_t *cs = c->cs;
+ if (c->clogging_input_filters) {
+ return ap_process_http_connection(c);
+ }
+
AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE);
while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
filter_ctx->pbioWrite = BIO_new(&bio_filter_out_method);
filter_ctx->pbioWrite->ptr = (void *)bio_filter_out_ctx_new(filter_ctx, c);
+ /* We insert a clogging input filter. Let the core know. */
+ c->clogging_input_filters = 1;
+
ssl_io_input_add_filter(filter_ctx, c, ssl);
SSL_set_bio(ssl, filter_ctx->pbioRead, filter_ctx->pbioWrite);
c->cs->c = c;
c->cs->p = ptrans;
c->cs->bucket_alloc = alloc;
+ c->clogging_input_filters = 0;
return c;
}
pt = cs->pfd.client_data;
}
+ if (c->clogging_input_filters && !c->aborted) {
+ /* Since we have an input filter which 'cloggs' the input stream,
+ * like mod_ssl, lets just do the normal read from input filters,
+ * like the Worker MPM does.
+ */
+ ap_run_process_connection(c);
+ ap_lingering_close(c);
+ return 0;
+ }
+
read_request:
if (cs->state == CONN_STATE_READ_REQUEST_LINE) {
if (!c->aborted) {