[core] run config_setup_connection() fewer times
config_setup_connection() is run when con struct is init'd and in connection_reset(), after each request is processed. It also must be called upon HANDLER_COMEBACK when the request needs to be re-parsed, but it need not be run twice in common scenario without HANDLER_COMEBACKpersonal/stbuehler/ci-build
parent
78a6440492
commit
e01f995ce3
|
@ -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 */
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue