You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2010/02/23 22:40:38 UTC

svn commit: r915531 - in /couchdb/branches/0.11.x: ./ etc/default/couchdb test/javascript/couch_http.js

Author: davisp
Date: Tue Feb 23 21:40:38 2010
New Revision: 915531

URL: http://svn.apache.org/viewvc?rev=915531&view=rev
Log:
Backport JavaScript test runner fixes.


Modified:
    couchdb/branches/0.11.x/   (props changed)
    couchdb/branches/0.11.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.11.x/test/javascript/couch_http.js

Propchange: couchdb/branches/0.11.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 23 21:40:38 2010
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636
+/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636,915529

Propchange: couchdb/branches/0.11.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 23 21:40:38 2010
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636
+/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636,915529
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.11.x/test/javascript/couch_http.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/test/javascript/couch_http.js?rev=915531&r1=915530&r2=915531&view=diff
==============================================================================
--- couchdb/branches/0.11.x/test/javascript/couch_http.js (original)
+++ couchdb/branches/0.11.x/test/javascript/couch_http.js Tue Feb 23 21:40:38 2010
@@ -15,11 +15,15 @@
 
   if(typeof(CouchHTTP) != "undefined") {
     CouchHTTP.prototype.open = function(method, url, async) {
-      if(/^\s*http:\/\//.test(url)) {
-        return this._open(method, url, async);
-      } else {
-        return this._open(method, this.base_url + url, async);
+      if(!/^\s*http:\/\//.test(url)) {
+        if(/^[^\/]/.test(url)) {
+          url = this.base_url + "/" + url;
+        } else {
+         url = this.base_url + url;
+        }
       }
+      
+      return this._open(method, url, async);
     };
     
     CouchHTTP.prototype.setRequestHeader = function(name, value) {
@@ -52,6 +56,7 @@
   }
 })();
 
+CouchDB.urlPrefix = "";
 CouchDB.newXhr = function() {
   return new CouchHTTP();
 };