You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/09 16:40:19 UTC

svn commit: r1665259 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

Author: rhuijben
Date: Mon Mar  9 15:40:19 2015
New Revision: 1665259

URL: http://svn.apache.org/r1665259
Log:
In ra-serf's error handling: Following up on r1557686, make sure that after we
decide to discard the body, we don't assume that the handler is no longer
scheduled.

A test triggering this issue will be added in a followup patch.

* subversion/libsvn_ra_serf/util.c
  (handle_response_cb): Keep the handler marked as scheduled, to allow processing
    the remaining data (by ignoring) later *or* by resetting the connection if
    the handler's pool is destroyed.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1665259&r1=1665258&r2=1665259&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Mon Mar  9 15:40:19 2015
@@ -1453,7 +1453,13 @@ handle_response_cb(serf_request_t *reque
     {
       handler->discard_body = TRUE; /* Discard further data */
       handler->done = TRUE; /* Mark as done */
-      handler->scheduled = FALSE;
+      /* handler->scheduled is still TRUE, as we still expect data.
+         If we would return an error outer-status the connection
+         would have to be restarted. With scheduled still TRUE
+         destroying the handler's pool will still reset the
+         connection, avoiding the posibility of returning
+         an error for this handler when a new request is
+         scheduled. */
       outer_status = APR_EAGAIN; /* Exit context loop */
     }