Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

handler_proxy: Don't set the 'got all' flag when POST data is received

That flag only use is to know if the connection can be re-used. Getting
all the POST data from the client has _nothing_ to do with that, we
must only set it when the response from the backend is complete.

Failure to do this results in the connection trying to be reused when
it's not ready ... In case of failure it's not closed and the next
request might try to use it whatever state its in.

Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
  • Loading branch information...
commit 099128800132c46531f8a4e6fd43c30b0e820e6f 1 parent 9864126
@skinkie skinkie authored
Showing with 13 additions and 2 deletions.
  1. +0 −2  cherokee/handler_proxy.c
  2. +13 −0 qa/TODO
View
2  cherokee/handler_proxy.c
@@ -815,12 +815,10 @@ send_post (cherokee_handler_proxy_t *hdl)
if (hdl->pconn->post.do_buf_sent) {
if (hdl->pconn->post.sent >= buffer->len) {
- hdl->got_all = true;
return ret_ok;
}
} else {
if (cherokee_buffer_is_empty (buffer)) {
- hdl->got_all = true;
return ret_ok;
}
}
View
13 qa/TODO
@@ -0,0 +1,13 @@
+Bug 1364 defines the following:
+
+1. Configure cherokee with a reverse proxy handler to a given backend and a 5 second timeout
+2. In that backend, just sleep for 10 s before responding
+3. Do two POST one after the other
+4. In the error log you'll find :
+
+-----
+[11/06/2012 14:26:49.791] (error) socket.c:708 - Could not write to socket:
+ write(18, ..): 'Bad file descriptor' | It looks like you've hit a bug in the server.
+ Please, do not hesitate to report it at http://bugs.cherokee-project.com/
+ so the developer team can fix it.
+-----
Please sign in to comment.
Something went wrong with that request. Please try again.