subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r918210 - /subversion/trunk/subversion/libsvn_ra_serf/options.c
Date Tue, 02 Mar 2010 21:53:59 GMT
Author: hwright
Date: Tue Mar  2 21:53:58 2010
New Revision: 918210

URL: http://svn.apache.org/viewvc?rev=918210&view=rev
Log:
Introduce a developer shortcut for allowing a 1.7-era client to only speak
HTTPv1, even if the serve announces it will support HTTPv2.  This is
anticipated to be useful for testing.

This will probably disappear before 1.7.0 goes final.

* subversion/libsvn_ra_serf/options.c
  (SVN_IGNORE_V2_ENV_VAR): New.
  (capabilities_headers_iterator_callback): If a dev build, and if the proper
    environment variable is set, ignore the v2 capability sent from the server.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/options.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=918210&r1=918209&r2=918210&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Tue Mar  2 21:53:58 2010
@@ -42,6 +42,8 @@
 
 #include "ra_serf.h"
 
+#define SVN_IGNORE_V2_ENV_VAR "SVN_I_LIKE_LATENCY_SO_IGNORE_HTTPV2"
+
 
 /*
  * This enum represents the current state of our XML parsing for an OPTIONS.
@@ -332,7 +334,19 @@
         }
       else if (svn_cstring_casecmp(key, SVN_DAV_ME_RESOURCE_HEADER) == 0)
         {
+#ifdef SVN_DEBUG
+          /* ### This section is throw in here for development use.  It
+             ### allows devs the chance to force the client to speak v1,
+             ### even if the server is capable of speaking v2.  We should
+             ### probably remove it before 1.7 goes final. */
+          char *ignore_v2_env_var = getenv(SVN_IGNORE_V2_ENV_VAR);
+
+          if (!(ignore_v2_env_var
+                && apr_strnatcasecmp(ignore_v2_env_var, "yes") == 0))
+            orc->session->me_resource = apr_pstrdup(orc->session->pool, val);
+#else
           orc->session->me_resource = apr_pstrdup(orc->session->pool, val);
+#endif
         }
       else if (svn_cstring_casecmp(key, SVN_DAV_REV_STUB_HEADER) == 0)
         {



Mime
View raw message