From 4cebf7ea20a7d05c66c08690cdefe67898c8711d Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Wed, 19 Aug 2009 17:09:50 +0000 Subject: 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 --- share/www/script/test/http.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'share/www/script/test/http.js') 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"); -- cgit v1.2.3