subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r1350179 - /subversion/trunk/subversion/libsvn_ra_serf/util.c
Date Thu, 14 Jun 2012 10:22:23 GMT
Author: jerenkrantz
Date: Thu Jun 14 10:22:22 2012
New Revision: 1350179

URL: http://svn.apache.org/viewvc?rev=1350179&view=rev
Log:
Fix authz test #15 on jcovel's machine by properly draining the buckets.

(The COPY response from add_directory wasn't being read properly, so when we
come around to send the add_file, the response for COPY wasn't completely read
and we crashed.)

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__expect_empty_body, svn_ra_serf__handle_multistatus_only): Don't
  set done here.
  (handle_response): Set done when we see EOF so we ensure we wait long
  enough.

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=1350179&r1=1350178&r2=1350179&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Thu Jun 14 10:22:22 2012
@@ -990,11 +990,6 @@ svn_ra_serf__expect_empty_body(serf_requ
     }
   else
     {
-      /* ### hmm. this is a bit early. we have not seen EOF. if the
-         ### caller thinks we are "done", then it may never call into
-         ### serf_context_run() again to flush the response.  */
-      handler->done = TRUE;
-
       /* The body was not text/xml, so we don't know what to do with it.
          Toss anything that arrives.  */
       handler->discard_body = TRUE;
@@ -1175,11 +1170,6 @@ svn_ra_serf__handle_multistatus_only(ser
         }
       else
         {
-          /* ### hmm. this is a bit early. we have not seen EOF. if the
-             ### caller thinks we are "done", then it may never call into
-             ### serf_context_run() again to flush the response.  */
-          handler->done = TRUE;
-
           /* The body was not text/xml, so we don't know what to do with it.
              Toss anything that arrives.  */
           handler->discard_body = TRUE;
@@ -1891,6 +1881,14 @@ handle_response(serf_request_t *request,
   if (handler->discard_body)
     {
       *serf_status = drain_bucket(response);
+
+      /* If the handler hasn't set done (which it shouldn't have) and
+         we now have the EOF, go ahead and set it so that we can stop
+         our context loops.
+       */
+      if (!handler->done && APR_STATUS_IS_EOF(*serf_status))
+          handler->done = TRUE;
+
       return SVN_NO_ERROR;
     }
 



Mime
View raw message