https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412007-05-14T09:47:02Zlighty labsLighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28162007-05-14T09:47:02ZAnonymous
<ul></ul><p>I would suggest to use AJP13 protocol with Tomcat instead of proxying HTTP requests.</p>
<p>At least we've successfully run almost half a year Tomcat with AJP13 with lighty 1.5-x trunk.</p>
<p>-- jtiai</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28172007-11-12T16:05:36ZAnonymous
<ul></ul><p>We have exactly same problem.</p>
<p>BTW AJP13 seems to work much slower then HTTP proxy.</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28182007-11-12T16:21:32Zstepanchegyozh@mx1.ru
<ul></ul><p>Problem was seen in the last announced version -- r1992.</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28192007-11-12T19:33:45Zmoe
<ul></ul><p>Well, we're not using tomcat anymore (left the java-world, it's all fastcgi now) but I<br />wonder if this is a bug in the mod_proxy_core http backend or if it's a particular problem<br />with tomcat.</p>
<p>Is anyone using the http backend for anything other than tomcat (or a servlet engine)?<br />Do you see the same problem?</p>
<p>It smells like a classic off-by-one bug to me.</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28202007-11-12T19:51:32Zstepanchegyozh@mx1.ru
<ul></ul><p>Oops, trac didn't save my comment. Typing again.</p>
<p>mod_proxy_backend_http does not interpret 304 response properly: it always tries to read http message body. 304 requires response has no message body. So Tomcat does not send either "content-length" or "transfer-encoding: chunked" headers. So mod_proxy_backend_http reads until EOF, i. e. hangs.</p>
<p>I tried to</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28212007-11-12T19:52:37Zstepanchegyozh@mx1.ru
<ul></ul><p>diff again:</p>
<pre>
--- mod_proxy_backend_http.c.orig 2007-11-12 22:42:14.000000000 +0300
+++ mod_proxy_backend_http.c 2007-11-12 22:23:50.000000000 +0300
@@ -226,38 +226,42 @@
PROXY_STREAM_DECODER_FUNC(proxy_http_stream_decoder) {
proxy_connection *proxy_con = sess->proxy_con;
chunkqueue *in = proxy_con->recv;
chunk *c;
if (in->first == NULL) {
if ((sess->content_length >= 0 && sess->bytes_read == sess->content_length) || in->is_closed) {
sess->is_request_finished = 1;
return HANDLER_FINISHED;
}
return HANDLER_GO_ON;
}
/* parse response headers. */
if (!sess->have_response_headers) {
handler_t rc = proxy_http_parse_response_headers(sess, in);
if (rc != HANDLER_FINISHED) return rc;
}
+
+ if (sess->resp->status == 304) {
+ return HANDLER_FINISHED;
+ }
if (sess->is_chunked) {
return proxy_http_parse_chunked_stream(srv, sess, in, out);
} else {
</pre> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28222008-02-08T08:07:50Zstepanchegyozh@mx1.ru
<ul></ul><p>Is anybody alive there? mod_proxy_backend_http is still broken.</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28232008-02-27T13:32:21ZAnonymous
<ul></ul><p>I have the same problem with apache and fixed it by setting KeepAlive=off in the Apache configuration (for now).</p>
<p>-- sui</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=28242008-07-28T15:42:41Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul><p>Fixed in r2235</p> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=69152010-04-30T21:19:40Zstepanchegyozh@mx1.ru
<ul><li><strong>Status</strong> changed from <i>Fixed</i> to <i>Reopened</i></li></ul><p>Same problem with 204 response code. Patch is trivial:</p>
<pre>
diff -r 02c80992f79d src/mod_proxy_backend_http.c
--- a/src/mod_proxy_backend_http.c Tue Mar 16 14:59:45 2010 +0300
+++ b/src/mod_proxy_backend_http.c Fri Apr 30 23:13:50 2010 +0400
@@ -108,6 +108,7 @@
switch (sess->resp->status) {
case 205: /* class: header only */
+ case 204:
case 304:
sess->is_request_finished = 1;
}
</pre> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=98992016-07-06T05:13:24Zgstrauss
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/9899/diff?detail_id=8159">diff</a>)</li><li><strong>Missing in 1.5.x</strong> set to <i>Yes</i></li></ul> Lighttpd - Bug #1178: mod_proxy_core + tomcat = hanging requestshttps://redmine.lighttpd.net/issues/1178?journal_id=101182016-07-16T12:38:29Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Obsolete</i></li></ul>