dovecot-2.2: lib-http: Fixed assertion failure in http_client_re...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 27 14:02:16 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/abffff2e916f
changeset: 17390:abffff2e916f
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue May 27 17:01:15 2014 +0300
description:
lib-http: Fixed assertion failure in http_client_request_send_payload() caused by inappropriate retry attempt.

diffstat:

 src/lib-http/http-client-request.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 5c6f49e2d8d9 -r abffff2e916f src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c	Mon May 26 04:26:01 2014 +0300
+++ b/src/lib-http/http-client-request.c	Tue May 27 17:01:15 2014 +0300
@@ -1004,6 +1004,13 @@
 
 bool http_client_request_try_retry(struct http_client_request *req)
 {
+	/* don't ever retry if we're sending data in small blocks via
+	   http_client_request_send_payload() and we're not waiting for a
+	   100 continue (there's no way to rewind the payload for a retry)
+	 */
+	if (req->payload_wait &&
+		(!req->payload_sync || req->conn->payload_continue))
+		return FALSE;
 	/* limit the number of attempts for each request */
 	if (req->attempts+1 >= req->client->set.max_attempts)
 		return FALSE;


More information about the dovecot-cvs mailing list