dovecot-2.2: lib-http: Send Content-Length whenever payload is s...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 8 20:25:32 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/0aea43f87c0b
changeset: 16003:0aea43f87c0b
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 08 20:25:12 2013 +0200
description:
lib-http: Send Content-Length whenever payload is specified, even if its size is 0.
diffstat:
src/lib-http/http-client-request.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 7a08461c5559 -r 0aea43f87c0b src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c Wed Mar 06 11:39:43 2013 +0200
+++ b/src/lib-http/http-client-request.c Fri Mar 08 20:25:12 2013 +0200
@@ -354,7 +354,9 @@
str_append(rtext, "Transfer-Encoding: chunked\r\n");
req->payload_output =
http_transfer_chunked_ostream_create(output);
- } else if (req->payload_size != 0) {
+ } else if (req->payload_input != NULL) {
+ /* send Content-Length if we have specified a payload,
+ even if it's 0 bytes. */
str_printfa(rtext, "Content-Length: %"PRIuUOFF_T"\r\n",
req->payload_size);
req->payload_output = output;
More information about the dovecot-cvs
mailing list