serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1804543 - /serf/branches/1.3.x-fix-outgoing-request-err/outgoing.c
Date Wed, 09 Aug 2017 15:25:32 GMT
Author: kotkov
Date: Wed Aug  9 15:25:32 2017
New Revision: 1804543

On the '1.3.x-fix-outgoing-request-err' branch: Unset the hit_eof flag
before reading from the pending output buckets.

With the current approach where a hold_open aggregate bucket is used to
check for the end of the outgoing data, the "hit_eof" flag can also be
inadvertently set when peeking at this bucket request_or_data_pending().
That would cause the actual read error (read_status) to be silently
ignored if the flag is has been set before the call to read_iovec().

Note: in trunk, the new serf_pump__write() function does the same thing.

* outgoing.c
  (write_to_connection): Unset the hit_eof flag before calling read_iovec().


Modified: serf/branches/1.3.x-fix-outgoing-request-err/outgoing.c
--- serf/branches/1.3.x-fix-outgoing-request-err/outgoing.c (original)
+++ serf/branches/1.3.x-fix-outgoing-request-err/outgoing.c Wed Aug  9 15:25:32 2017
@@ -815,6 +815,7 @@ static apr_status_t write_to_connection(
            data as available, we probably don't want to read ALL_AVAIL, but
            a lower number, like the size of one or a few TCP packets, the
            available TCP buffer size ... */
+        conn->hit_eof = 0;
         read_status = serf_bucket_read_iovec(ostreamh,

View raw message