Author: rhuijben
Date: Thu Mar 12 08:44:06 2015
New Revision: 1666096
URL: http://svn.apache.org/r1666096
Log:
Following up on r1665195, provide the more accurate SVN_ERR_RA_NOT_IMPLEMENTED
error on http status 405 from server that don't provide server error reports
with more specific error details.
* subversion/libsvn_ra_serf/util.c
(svn_ra_serf__error_on_status): Tweak return code.
(svn_ra_serf__unexpected_status): Specialize 405 with a more detailed error
report.
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=1666096&r1=1666095&r2=1666096&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Thu Mar 12 08:44:06 2015
@@ -1793,8 +1793,9 @@ svn_ra_serf__error_on_status(serf_status
return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
_("'%s' path not found"), path);
case 405:
- return svn_error_createf(SVN_ERR_RA_DAV_FORBIDDEN, NULL,
- _("HTTP method is not allowed on '%s'"),
path);
+ return svn_error_createf(SVN_ERR_RA_NOT_IMPLEMENTED, NULL,
+ _("HTTP method is not supported on '%s'"),
+ path);
case 409:
return svn_error_createf(SVN_ERR_FS_CONFLICT, NULL,
_("'%s' conflicts"), path);
@@ -1833,9 +1834,10 @@ svn_error_t *
svn_ra_serf__unexpected_status(svn_ra_serf__handler_t *handler)
{
/* Is it a standard error status? */
- SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
- handler->path,
- handler->location));
+ if (handler->sline.code != 405)
+ SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
+ handler->path,
+ handler->location));
switch (handler->sline.code)
{
@@ -1848,6 +1850,11 @@ svn_ra_serf__unexpected_status(svn_ra_se
_("Path '%s' already exists"),
handler->path);
+ case 405:
+ return svn_error_createf(SVN_ERR_RA_NOT_IMPLEMENTED, NULL,
+ _("HTTP method '%s' is not supported"
+ " on '%s'"),
+ handler->method, handler->path);
default:
return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
_("Unexpected HTTP status %d '%s' on '%s' "