dovecot-2.2: lib-http: http-client: Fixed pipelining when payloa...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 15 03:38:25 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/7b775a06c38f
changeset: 16730:7b775a06c38f
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Sep 15 03:27:31 2013 +0300
description:
lib-http: http-client: Fixed pipelining when payload synchronizatio (100-continue) is used.
Forgot to lock the connection output, which meant that new requests would
enqueued for the connection while waiting for 100 Continue. This would
cause an assert failure.
diffstat:
src/lib-http/http-client-connection.c | 5 ++++-
src/lib-http/http-client-request.c | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r ae309d070b44 -r 7b775a06c38f src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c Sat Sep 14 00:26:58 2013 +0300
+++ b/src/lib-http/http-client-connection.c Sun Sep 15 03:27:31 2013 +0300
@@ -552,7 +552,7 @@
if (conn->payload_continue) {
http_client_connection_debug(conn,
"Got 100-continue response after timeout");
- return;
+ continue;
}
conn->peer->no_payload_sync = FALSE;
conn->peer->seen_100_response = TRUE;
@@ -583,11 +583,14 @@
http_client_request_unref(&req);
conn->close_indicated = response->connection_close;
+ if (req->payload_sync && !conn->payload_continue)
+ conn->output_locked = FALSE;
if (!aborted) {
if (response->status == 417 && req->payload_sync) {
/* drop Expect: continue */
req->payload_sync = FALSE;
+ conn->output_locked = FALSE;
conn->peer->no_payload_sync = TRUE;
http_client_request_retry(req, response->status, response->reason);
return;
diff -r ae309d070b44 -r 7b775a06c38f src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c Sat Sep 14 00:26:58 2013 +0300
+++ b/src/lib-http/http-client-request.c Sun Sep 15 03:27:31 2013 +0300
@@ -415,6 +415,7 @@
ret = -1;
} else {
http_client_request_debug(req, "Waiting for 100-continue");
+ conn->output_locked = TRUE;
}
} else {
req->state = HTTP_REQUEST_STATE_WAITING;
More information about the dovecot-cvs
mailing list