dovecot-2.2: lib-http: server: Fixed a hang occurring sometimes ...

dovecot at dovecot.org dovecot at dovecot.org
Sun Oct 26 16:44:59 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/c7629d149d7a
changeset: 18027:c7629d149d7a
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sun Oct 26 18:43:57 2014 +0200
description:
lib-http: server: Fixed a hang occurring sometimes when response is sent for a request that had payload.
Forgot to always trigger sending response when processing request payload
finishes.

diffstat:

 src/lib-http/http-server-connection.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 69af57dcd274 -r c7629d149d7a src/lib-http/http-server-connection.c
--- a/src/lib-http/http-server-connection.c	Sun Oct 26 18:43:57 2014 +0200
+++ b/src/lib-http/http-server-connection.c	Sun Oct 26 18:43:57 2014 +0200
@@ -229,6 +229,8 @@
 		req->state = HTTP_SERVER_REQUEST_STATE_PROCESSING;
 		if (req->response != NULL && req->response->submitted)
 			http_server_request_submit_response(req);
+	} else if (req->state == HTTP_SERVER_REQUEST_STATE_SUBMITTED_RESPONSE) {
+		http_server_request_ready_to_respond(req);
 	}
 
 	/* input stream may have pending input. make sure input handler
@@ -749,7 +751,7 @@
 bool
 http_server_connection_pending_payload(struct http_server_connection *conn)
 {
-	return http_request_parser_pending_payload(conn->http_parser);
+	return conn->incoming_payload != NULL;
 }
 
 static struct connection_settings http_server_connection_set = {


More information about the dovecot-cvs mailing list