Index: subversion/libsvn_ra_serf/options.c =================================================================== --- subversion/libsvn_ra_serf/options.c (revision 1823355) +++ subversion/libsvn_ra_serf/options.c (working copy) @@ -71,6 +71,9 @@ svn_ra_serf__response_handler_t inner_handler; void *inner_baton; + /* Have we received any DAV headers at all? */ + svn_boolean_t dav_header_received; + const char *activity_collection; svn_revnum_t youngest_rev; @@ -165,6 +168,8 @@ apr_array_header_t *vals = svn_cstring_split(val, ",", TRUE, opt_ctx->pool); + opt_ctx->dav_header_received = TRUE; + /* Right now we only have a few capabilities to detect, so just seek for them directly. This could be written slightly more efficiently, but that wouldn't be worth it until we have many @@ -396,6 +401,14 @@ serf_bucket_headers_do(hdrs, capabilities_headers_iterator_callback, opt_ctx); + /* Bail out early if we're not talking to a DAV server. */ + if (!opt_ctx->dav_header_received) + { + return svn_error_create( + SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL, + _("The server does not support the HTTP/DAV protocol")); + } + /* Assume mergeinfo capability unsupported, if didn't receive information about server or repository mergeinfo capability. */ if (!svn_hash_gets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO))