dovecot-2.2: lib-http: Parser didn't always fully skip over the ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Dec 5 07:57:47 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/b61b94be996e
changeset: 15454:b61b94be996e
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 05 07:57:35 2012 +0200
description:
lib-http: Parser didn't always fully skip over the previous request's payload.
diffstat:
src/lib-http/http-response-parser.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r 0be51d94b0d9 -r b61b94be996e src/lib-http/http-response-parser.c
--- a/src/lib-http/http-response-parser.c Tue Dec 04 14:10:34 2012 +0200
+++ b/src/lib-http/http-response-parser.c Wed Dec 05 07:57:35 2012 +0200
@@ -379,10 +379,10 @@
i_assert(parser->state == HTTP_RESPONSE_PARSE_STATE_INIT);
- if (!payload->eof) {
- while ((ret=i_stream_read(payload)) > 0) {
+ if (i_stream_have_bytes_left(payload)) {
+ do {
i_stream_skip(payload, i_stream_get_data_size(payload));
- }
+ } while ((ret=i_stream_read(payload)) > 0);
if (ret == 0)
return 0;
if (ret < 0 && !payload->eof) {
More information about the dovecot-cvs
mailing list