/[Apache-SVN]
ViewVC logotype

Revision 1031877


Jump to revision: Previous Next
Author: davisp
Date: Fri Nov 5 23:26:21 2010 UTC (13 years, 4 months ago)
Changed paths: 10
Log Message:
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.



Changed paths

Path Details
Directorycouchdb/trunk/etc/couchdb/local.ini modified , text changed
Directorycouchdb/trunk/share/www/script/test/basics.js modified , text changed
Directorycouchdb/trunk/src/couchdb/Makefile.am modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_httpd.erl modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_httpd_proxy.erl added
Directorycouchdb/trunk/test/etap/ modified , props changed
Directorycouchdb/trunk/test/etap/180-http-proxy.ini added
Directorycouchdb/trunk/test/etap/180-http-proxy.t added
Directorycouchdb/trunk/test/etap/Makefile.am modified , text changed
Directorycouchdb/trunk/test/etap/test_web.erl added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26