diff options
author | Robert Newson <rnewson@apache.org> | 2010-07-26 17:21:30 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2010-07-26 17:21:30 +0000 |
commit | 4b0948ddb3a428f8a5330e05745b2fbd4ccf9375 (patch) | |
tree | 5ab1dde286028653d5569ceae6dfc883fa365b7a /share/www/script/test/http.js | |
parent | cd214b23e8129868d4a7020ddafd55a16e496652 (diff) |
Add SSL support to CouchDB.
To enable SSL you need to do three things;
1) enable the httpsd daemon in local.ini (you can just uncomment the line).
2) supply your PEM-encoded cert and key files in the [ssl] section.
3) start CouchDB.
CouchDB will now, in addition to handling HTTP on port 5984, accept SSL connections on port 6984.
The patch itself adds SSL support by updating the local version of Mochiweb to the latest. The upstream release includes our local tweak to support large numbers and to handle Accept-Encoding headers. Our local Mochiweb fork changed the default idle timeout from 10 seconds to 5 minutes, and it was agreed on #irc to revert this change.
The only tweaks to Mochiweb were in mochiweb.app.src (to record the git commit I built from) and the removal of Makefile (replaced by Makefile.am).
Futon received many tweaks as we have 'http://' hardcoded all over. All such instances now use window.location.protocol + '//'.
CouchDB received a tweak to use the right scheme in couch_httpd:absolute_uri (it now gets it from the Mochireq and not mochiweb_socket_server).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@979368 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/http.js')
-rw-r--r-- | share/www/script/test/http.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/www/script/test/http.js b/share/www/script/test/http.js index 8a2e09b8..39f58491 100644 --- a/share/www/script/test/http.js +++ b/share/www/script/test/http.js @@ -25,7 +25,7 @@ couchTests.http = function(debug) { var xhr = CouchDB.request("PUT", "/test_suite_db/test", {body: "{}"}); var host = CouchDB.host; - TEquals("http://" + host + "/test_suite_db/test", + TEquals(window.location.protocol + "//" + host + "/test_suite_db/test", xhr.getResponseHeader("Location"), "should include ip address"); @@ -34,7 +34,7 @@ couchTests.http = function(debug) { headers: {"X-Forwarded-Host": "mysite.com"} }); - TEquals("http://mysite.com/test_suite_db/test2", + TEquals(window.location.protocol + "//" + "mysite.com/test_suite_db/test2", xhr.getResponseHeader("Location"), "should include X-Forwarded-Host"); @@ -47,7 +47,7 @@ couchTests.http = function(debug) { body: "{}", headers: {"X-Host": "mysite2.com"} }); - TEquals("http://mysite2.com/test_suite_db/test3", + TEquals(window.location.protocol + "//" + "mysite2.com/test_suite_db/test3", xhr.getResponseHeader("Location"), "should include X-Host"); }); |