From 11469d902b15145d361f9f7ec66a09ac3d04757c Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Fri, 5 Nov 2010 23:26:21 +0000 Subject: HTTP proxy handler. The second of two new features to replace the _externals protocols. This allows users to configure CouchDB to proxy requests to an external HTTP server. The external HTTP server is not required to be on the same host running CouchDB. The configuration looks like such: [httpd_global_handlers] _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>} You can then hit this proxy at the url: http://127.0.0.1:5984/_google If you add any path after the proxy name, or make a request with a query string, those will be appended to the URL specified in the configuration. Ie: http://127.0.0.1:5984/_google/search?q=plankton would translate to: http://www.google.com/search?q=plankton Obviously, request bodies are handled as expected. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031877 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/basics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/www/script/test/basics.js') diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js index 2deb094a..ce19565b 100644 --- a/share/www/script/test/basics.js +++ b/share/www/script/test/basics.js @@ -159,8 +159,8 @@ couchTests.basics = function(debug) { var loc = xhr.getResponseHeader("Location"); T(loc, "should have a Location header"); var locs = loc.split('/'); - T(locs[4] == resp.id); - T(locs[3] == "test_suite_db"); + T(locs[locs.length-1] == resp.id); + T(locs[locs.length-2] == "test_suite_db"); // test that that POST's with an _id aren't overriden with a UUID. var xhr = CouchDB.request("POST", "/test_suite_db", { -- cgit v1.2.3