mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 16:41:19 +00:00
* Port r546128 to mod_proxy_connect to ensure that core_pre_connection does not
succeed in resetting the timeout of our socket to base_server->timeout. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -170,6 +170,8 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
apr_port_t connectport = 0;
|
apr_port_t connectport = 0;
|
||||||
apr_sockaddr_t *nexthop;
|
apr_sockaddr_t *nexthop;
|
||||||
|
|
||||||
|
apr_interval_time_t current_timeout;
|
||||||
|
|
||||||
/* is this for us? */
|
/* is this for us? */
|
||||||
if (r->method_number != M_CONNECT) {
|
if (r->method_number != M_CONNECT) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "declining URL %s", url);
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "declining URL %s", url);
|
||||||
@ -272,6 +274,13 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
ap_proxy_ssl_engine(backconn, r->per_dir_config, 0);
|
ap_proxy_ssl_engine(backconn, r->per_dir_config, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* save the timeout of the socket because core_pre_connection
|
||||||
|
* will set it to base_server->timeout
|
||||||
|
* (core TimeOut directive).
|
||||||
|
*/
|
||||||
|
apr_socket_timeout_get(sock, ¤t_timeout);
|
||||||
rc = ap_run_pre_connection(backconn, sock);
|
rc = ap_run_pre_connection(backconn, sock);
|
||||||
if (rc != OK && rc != DONE) {
|
if (rc != OK && rc != DONE) {
|
||||||
backconn->aborted = 1;
|
backconn->aborted = 1;
|
||||||
@ -280,6 +289,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
apr_socket_close(sock);
|
apr_socket_close(sock);
|
||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
|
apr_socket_timeout_set(sock, current_timeout);
|
||||||
|
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
|
||||||
"connection complete to %pI (%s)",
|
"connection complete to %pI (%s)",
|
||||||
|
Reference in New Issue
Block a user