summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep_httpc.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-09-02 03:40:44 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-09-02 03:40:44 +0000
commit4536671ff6ca35e16665867ef40a1298e47f4626 (patch)
tree651024567a36560bfc9b4b6ced02a74b6fb0f4e1 /src/couchdb/couch_rep_httpc.erl
parentc1b797c10aef694415276f2fcb85676fddfb0ad8 (diff)
Support for replication over SSL. Resolves COUCHDB-491
This turned out to be a decent amount of work, since: 1) ibrowse did not use SSL on dedicated connections. Wrote a simplistic patch, will contact Chandru for further discussion. 2) When nginx is used for the SSL wrapper, it wants to buffer the changes feed. Setting "proxy_buffering off" in nginx.conf helps, but some buffering still occurred. Fixed by making couch_rep_changes_feed smart enough to split merged chunks. 3) The Erlang ssl application showed instabilities when used with {active,once}. Switched to the "new implementation" using {ssl_imp, new} and instabilities disappeared. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@810350 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep_httpc.erl')
-rw-r--r--src/couchdb/couch_rep_httpc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl
index 9e8bfb42..5689fa29 100644
--- a/src/couchdb/couch_rep_httpc.erl
+++ b/src/couchdb/couch_rep_httpc.erl
@@ -149,12 +149,12 @@ process_response({error, Reason}, Req) ->
spawn_worker_process(Req) ->
Url = ibrowse_lib:parse_url(Req#http_db.url),
- {ok, Pid} = ibrowse:spawn_worker_process(Url#url.host, Url#url.port),
+ {ok, Pid} = ibrowse_http_client:start(Url),
Pid.
spawn_link_worker_process(Req) ->
Url = ibrowse_lib:parse_url(Req#http_db.url),
- {ok, Pid} = ibrowse:spawn_link_worker_process(Url#url.host, Url#url.port),
+ {ok, Pid} = ibrowse_http_client:start_link(Url),
Pid.
maybe_decompress(Headers, Body) ->