You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/03/19 19:27:17 UTC
svn commit: r1458447 - in /httpd/httpd/trunk/modules:
filters/mod_reqtimeout.c proxy/mod_proxy_wstunnel.c
Author: jim
Date: Tue Mar 19 18:27:17 2013
New Revision: 1458447
URL: http://svn.apache.org/r1458447
Log:
Keep mod_req clear. Simply scan thru input filters and
remove it within the ws submodule. Nasty, but it keeps
mod_req untouched (for now ;) )
Modified:
httpd/httpd/trunk/modules/filters/mod_reqtimeout.c
httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c
Modified: httpd/httpd/trunk/modules/filters/mod_reqtimeout.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_reqtimeout.c?rev=1458447&r1=1458446&r2=1458447&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_reqtimeout.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_reqtimeout.c Tue Mar 19 18:27:17 2013
@@ -177,17 +177,6 @@ static apr_status_t reqtimeout_filter(ap
apr_interval_time_t saved_sock_timeout = UNSET;
reqtimeout_con_cfg *ccfg = f->ctx;
- /* connections can remove the filter even if configured */
- if (apr_table_get(f->c->notes, "remove-reqtimeout")) {
- ap_remove_input_filter(f);
- return ap_get_brigade(f->next, bb, mode, block, readbytes);
- }
-
- /* connections can bypass the filter even if configured */
- if (apr_table_get(f->c->notes, "bypass-reqtimeout")) {
- return ap_get_brigade(f->next, bb, mode, block, readbytes);
- }
-
if (ccfg->in_keep_alive) {
/* For this read, the normal keep-alive timeout must be used */
ccfg->in_keep_alive = 0;
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c?rev=1458447&r1=1458446&r2=1458447&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c Tue Mar 19 18:27:17 2013
@@ -136,6 +136,29 @@ static int proxy_wstunnel_transfer(reque
return rv;
}
+/* Search thru the input filters and remove the reqtimeout one */
+static void remove_reqtimeout(ap_filter_t *next)
+{
+ ap_filter_t *reqto = NULL;
+ ap_filter_rec_t *filter;
+
+ filter = ap_get_input_filter_handle("reqtimeout");
+ if (!filter) {
+ return;
+ }
+
+ while (next) {
+ if (next->frec == filter) {
+ reqto = next;
+ break;
+ }
+ next = next->next;
+ }
+ if (reqto) {
+ ap_remove_input_filter(reqto);
+ }
+}
+
/*
* process the request and write the response.
*/
@@ -166,8 +189,6 @@ static int ap_proxy_wstunnel_request(apr
header_brigade = apr_brigade_create(p, backconn->bucket_alloc);
- apr_table_setn(c->notes, "bypass-reqtimeout", "1");
-
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "sending request");
rv = ap_proxy_create_hdrbrgd(p, header_brigade, r, conn,
@@ -217,6 +238,8 @@ static int ap_proxy_wstunnel_request(apr
r->input_filters = c->input_filters;
r->proto_input_filters = c->input_filters;
+ remove_reqtimeout(r->input_filters);
+
while (1) { /* Infinite loop until error (one side closes the connection) */
if ((rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled))
!= APR_SUCCESS) {