dovecot-2.2: lib-http: Allow calling http_client_request_add_hea...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jan 15 00:29:29 EET 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/63244d272133
changeset: 17102:63244d272133
user: Timo Sirainen <tss at iki.fi>
date: Wed Jan 15 00:28:20 2014 +0200
description:
lib-http: Allow calling http_client_request_add_header() when retrying requests.
diffstat:
src/lib-http/http-client-request.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 632a1c79cdc3 -r 63244d272133 src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c Tue Jan 14 03:33:35 2014 +0200
+++ b/src/lib-http/http-client-request.c Wed Jan 15 00:28:20 2014 +0200
@@ -201,7 +201,11 @@
void http_client_request_add_header(struct http_client_request *req,
const char *key, const char *value)
{
- i_assert(req->state == HTTP_REQUEST_STATE_NEW);
+ i_assert(req->state == HTTP_REQUEST_STATE_NEW ||
+ /* allow calling for retries */
+ req->state == HTTP_REQUEST_STATE_GOT_RESPONSE ||
+ req->state == HTTP_REQUEST_STATE_ABORTED);
+
/* mark presence of special headers */
switch (key[0]) {
case 'c': case 'C':
More information about the dovecot-cvs
mailing list