diff --git a/src/connections.c b/src/connections.c index 3e608610..2d1ba5e9 100644 --- a/src/connections.c +++ b/src/connections.c @@ -1222,6 +1222,9 @@ static int connection_handle_request(server *srv, connection *con) { connection_fdwaitqueue_append(srv, con); break; case HANDLER_COMEBACK: + if (con->mode == DIRECT && buffer_is_empty(con->physical.path)) { + config_setup_connection(srv, con); + } return 1; case HANDLER_ERROR: /* something went wrong */ diff --git a/src/response.c b/src/response.c index 166f2f5c..4a2f0ab8 100644 --- a/src/response.c +++ b/src/response.c @@ -306,7 +306,6 @@ handler_t http_response_prepare(server *srv, connection *con) { if (!con->async_callback) { config_cond_cache_reset(srv, con); - config_setup_connection(srv, con); /* Perhaps this could be removed at other places. */ if (con->conf.log_condition_handling) { log_error_write(srv, __FILE__, __LINE__, "s", "run condition");