diff options
| author | Brian Pane <brianp@apache.org> | 2005-09-12 00:29:10 +0000 |
|---|---|---|
| committer | Brian Pane <brianp@apache.org> | 2005-09-12 00:29:10 +0000 |
| commit | d1ff1de803525c3aeb17cf83f034eb5dfd4edfab (patch) | |
| tree | cb944d45cc53811a03159a1484bead9c4a463684 | |
| parent | 9c05049bff60ff9a72a15c488b1f684eaf4d0088 (diff) | |
| download | httpd-d1ff1de803525c3aeb17cf83f034eb5dfd4edfab.tar.gz | |
Added new connection states CONN_STATE_HANDLER and CONN_STATE_WRITE_COMPLETION.
Also, core_create_conn() now initializes the conn_state within the newly
created connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@280221 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | CHANGES | 5 | ||||
| -rw-r--r-- | include/httpd.h | 2 | ||||
| -rw-r--r-- | modules/http/http_core.c | 11 | ||||
| -rw-r--r-- | server/core.c | 8 |
4 files changed, 22 insertions, 4 deletions
@@ -1,4 +1,9 @@ -*- coding: utf-8 -*- +Changes in Apache 2.3.0 async-dev R&D branch + + *) Added new connection states for handler and write completion + [Brian Pane] + Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] diff --git a/include/httpd.h b/include/httpd.h index 7f08b92d1d..0cb68df847 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1074,6 +1074,8 @@ struct conn_rec { typedef enum { CONN_STATE_CHECK_REQUEST_LINE_READABLE, CONN_STATE_READ_REQUEST_LINE, + CONN_STATE_HANDLER, + CONN_STATE_WRITE_COMPLETION, CONN_STATE_LINGER, } conn_state_e; diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 9dcee75697..805129f557 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -123,6 +123,7 @@ static int ap_process_http_async_connection(conn_rec *c) ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r); if (r->status == HTTP_OK) + cs->state = CONN_STATE_HANDLER; ap_process_request(r); if (ap_extended_status) @@ -135,10 +136,12 @@ static int ap_process_http_async_connection(conn_rec *c) else if (!c->data_in_input_filters) { cs->state = CONN_STATE_CHECK_REQUEST_LINE_READABLE; } - - /* else we are pipelining. Stay in READ_REQUEST_LINE state - * and stay in the loop - */ + else { + /* else we are pipelining. Return to READ_REQUEST_LINE state + * and stay in the loop + */ + cs->state = CONN_STATE_READ_REQUEST_LINE; + } apr_pool_destroy(r->pool); } diff --git a/server/core.c b/server/core.c index 41796c498e..589c770f63 100644 --- a/server/core.c +++ b/server/core.c @@ -3840,6 +3840,14 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server, c->id = id; c->bucket_alloc = alloc; + + c->cs = (conn_state_t *)apr_pcalloc(ptrans, sizeof(conn_state_t)); + APR_RING_INIT(&(c->cs->timeout_list), conn_state_t, timeout_list); + c->cs->expiration_time = 0; + c->cs->state = CONN_STATE_CHECK_REQUEST_LINE_READABLE; + c->cs->c = c; + c->cs->p = ptrans; + c->cs->bucket_alloc = alloc; return c; } |
