You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by lg...@apache.org on 2012/10/08 23:38:26 UTC
svn commit: r1395786 - /subversion/trunk/subversion/libsvn_ra_serf/util.c
Author: lgo
Date: Mon Oct 8 21:38:26 2012
New Revision: 1395786
URL: http://svn.apache.org/viewvc?rev=1395786&view=rev
Log:
Follow up to r1395777: consider 400, 411 and 501 as indications that
the server/proxy does not support HTTP/1.1. Retry those requests first with
HTTP/1.0.
* subversion/libsvn_ra_serf/util.c
(handle_response): If in HTTP/1.1 mode and one of three status codes
are returned, fall back to HTTP/1.0.
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=1395786&r1=1395785&r2=1395786&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Mon Oct 8 21:38:26 2012
@@ -1914,9 +1914,12 @@ handle_response(serf_request_t *request,
}
}
- /* 411 Length Required: server or proxy does not support HTTP/1.1, fall back
- to HTTP/1.0. */
- if (handler->sline.code == 411)
+ /* These error codes might indicate that the server or proxy does not support
+ HTTP/1.1 (completely), so fall back to HTTP/1.0. */
+ if (handler->session->http10 == FALSE &&
+ (handler->sline.code == 400 /* 400 Bad Request */
+ || handler->sline.code == 411 /* 411 Length Required */
+ || handler->sline.code == 501)) /* 501 Not Implemented */
{
handler->discard_body = TRUE;
handler->session->http10 = TRUE;