diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/echo/mod_echo.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index f3adbc96f7..111f312122 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -57,10 +57,10 @@ static int process_echo_connection(conn_rec *c) if (!pConfig->bEnabled) { return DECLINED; } - - bb = apr_brigade_create(c->pool, c->bucket_alloc); - for ( ; ; ) { + do { + bb = apr_brigade_create(c->pool, c->bucket_alloc); + /* Get a single line of input from the client */ if ((rv = ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE, APR_BLOCK_READ, 0) != APR_SUCCESS || @@ -72,8 +72,11 @@ static int process_echo_connection(conn_rec *c) /* Make sure the data is flushed to the client */ b = apr_bucket_flush_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); - ap_pass_brigade(c->output_filters, bb); - } + + /* Send back the data. */ + rv = ap_pass_brigade(c->output_filters, bb); + } while (rv == APR_SUCCESS); + return OK; } |