Parsing structured errors reported by the server requires normal response processing of the body. handle_multistatus_only() did this properly, but some calls to handle_server_error() are logically broken because they can only consume "ready" data from the network. Any kind of return to the context loop would break these usages.
Parsing structured errors reported by the server requires normal
response processing of the body. handle_multistatus_only() did this
properly, but some calls to handle_server_error() are logically broken
because they can only consume "ready" data from the network. Any kind
of return to the context loop would break these usages.

This commit begins work to set up proper handling for SERVER_ERROR in
the handler_t. Once SERVER_ERROR gets allocated, then the core
response loop will begin error processing.

* subversion/libsvn_ra_serf/util.c:
  (svn_ra_serf__handle_multistatus_only): adjust this code to decide
    whether to allocate SERVER_ERROR and begin processing, or to just
    discard everything in the response body. remove any xml parsing,
    as the core handler does that now.
  (handle_response): rename param to SCRATCH_POOL to clarify.
    initialize the returned SERF_STATUS. only initialize
    HANDLER->SLINE if we have not done so. add some explanatory
    comments. switch to SLINE rather than SL, as appropriate. set up
    HANDLER->LOCATION unconditionally. when SERVER_ERROR is set, parse
    the body for errors rather than using the configured response
    handler.
  (svn_ra_serf__request_create): reset some fields in HANDLER that
    have recently been added, and are stateful. we need to reset the
    handler to its original state before (re)queueing a request.

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