[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
httptunnel 3.3 doesn't work with Apache 1.3.33 mod_proxy
From: |
Szabó Péter |
Subject: |
httptunnel 3.3 doesn't work with Apache 1.3.33 mod_proxy |
Date: |
Mon, 27 Nov 2006 17:06:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060101 |
Hi!
Since Apache mod_proxy flushes the HTTP request bodies too
slowly, httptunnel doesn't work with it. See my patch to
mod_proxy attached.
However, I think that it is not mod_proxy that should be
patched, but httptunnel. That's because httptunnel should
be able to communicate in a proxied environment, where the
proxy buffers request bodies. Now httptunnel doesn't work
this way, so I think this is a bug.
This is not a new bug at all! It was reported in 2001
(http://marc.theaimsgroup.com/?l=httptunnel&m=100118684804708&w=2),
and it still persists.
Best regards,
Péter Szabó
--- mod_proxy/proxy_http.c.orig 2006-11-27 16:48:37.000000000 +0100
+++ mod_proxy/proxy_http.c 2006-11-27 16:48:49.000000000 +0100
@@ -386,20 +386,21 @@
* if this happens we ignore the 100 continue status line and read the
* response again.
*/
{
/* send the request data, if any. */
ap_hard_timeout("proxy receive request data", r);
if (ap_should_client_block(r)) {
while ((i = ap_get_client_block(r, buffer, sizeof buffer)) > 0) {
ap_reset_timeout(r);
ap_bwrite(f, buffer, i);
+ ap_bflush(f);
}
}
ap_bflush(f);
ap_kill_timeout(r);
/* then, read a response line */
ap_hard_timeout("proxy receive response status line", r);
result = ap_proxy_read_response_line(f, r, buffer, sizeof(buffer)-1,
&backasswards, &major, &minor);
ap_kill_timeout(r);
--- mod_proxy/proxy_util.c.orig 2006-11-27 16:49:13.000000000 +0100
+++ mod_proxy/proxy_util.c 2006-11-27 16:49:56.000000000 +0100
@@ -592,25 +592,27 @@
ap_log_rerror(APLOG_MARK, APLOG_ERR, c->req,
"proxy: error writing to %s", c->tempfile);
c = ap_proxy_cache_error(c);
}
else {
c->written += n;
}
}
/* Write the block to the client, detect aborted transfers */
+ ap_bflush(con->client);
while (!nowrite && !con->aborted && n > 0) {
if (alternate_timeouts)
ap_soft_timeout("proxy send body", r);
w = ap_bwrite(con->client, &buf[o], n);
+ ap_bflush(con->client);
if (alternate_timeouts)
ap_kill_timeout(r);
else
ap_reset_timeout(r);
if (w <= 0) {
if (c != NULL) {
/*
* when a send failure occurs, we need to decide whether
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- httptunnel 3.3 doesn't work with Apache 1.3.33 mod_proxy,
Szabó Péter <=