Fix race condition in ra_serf which can cause infinite-loop during a commit. Diagnosis and patch by Jon Trowbridge <jon@trowbridge.org>.
Fix race condition in ra_serf which can cause infinite-loop during a commit.
Diagnosis and patch by Jon Trowbridge <jon@trowbridge.org>.

After initializing the parser, we were attempting to make it parse
response data.  Apparently up till now, the server response was always
"fast enough" such that 100% of the response was waiting in the
buffer, ready to be parsed, and so __handle_xml_parser() always
succeeded.

But if you introduce latency into the server's response then parsing
might fail (the data may not be available yet), which means
'parser.done' doesn't get set.  But then we *never* re-enter the
initialization block on subsequent calls, which means 'done' never
gets set, which means we're in an infinite loop waiting for 'done'.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__handle_multistatus_only): separate parser
  initialization from the "is parser done?" check.  And actually examine
  the status result of __handle_xml_parser()!

jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion