diff options
author | Jan Lehnardt <jan@apache.org> | 2009-08-19 17:09:50 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-08-19 17:09:50 +0000 |
commit | 4cebf7ea20a7d05c66c08690cdefe67898c8711d (patch) | |
tree | d4835922e01b4373d3b8205082b452e5c578e86d /share/www | |
parent | 1b59e6f8105ac88965900e63b7b4d5fc274d4db2 (diff) |
make http.js hostname-aware, patch by Benoit Chesneau, closes COUCHDB-475
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805883 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/test/http.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/share/www/script/test/http.js b/share/www/script/test/http.js index 05bd471e..8a2e09b8 100644 --- a/share/www/script/test/http.js +++ b/share/www/script/test/http.js @@ -21,10 +21,11 @@ couchTests.http = function(debug) { // PUT on existing DB should return 412 instead of 500 if (debug) debugger; - + var xhr = CouchDB.request("PUT", "/test_suite_db/test", {body: "{}"}); - - TEquals("http://127.0.0.1:5984/test_suite_db/test", + var host = CouchDB.host; + + TEquals("http://" + host + "/test_suite_db/test", xhr.getResponseHeader("Location"), "should include ip address"); |