You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/12 07:21:02 UTC
[13/33] ibrowse commit: updated refs/heads/import-master to 1167b0e
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
Project: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/commit/96d28d85
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/tree/96d28d85
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/diff/96d28d85
Branch: refs/heads/import-master
Commit: 96d28d85d235dfff8ead68d603d03edb42f3818f
Parents: c6b2bb6
Author: Adam Kocoloski <ko...@apache.org>
Authored: Wed Sep 2 03:40:44 2009 +0000
Committer: Adam Kocoloski <ko...@apache.org>
Committed: Wed Sep 2 03:40:44 2009 +0000
----------------------------------------------------------------------
ibrowse_http_client.erl | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-ibrowse/blob/96d28d85/ibrowse_http_client.erl
----------------------------------------------------------------------
diff --git a/ibrowse_http_client.erl b/ibrowse_http_client.erl
index dde258e..5f62f70 100644
--- a/ibrowse_http_client.erl
+++ b/ibrowse_http_client.erl
@@ -113,6 +113,16 @@ init({Host, Port}) ->
port = Port},
put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
+ {ok, State};
+init(#url{host=Host, port=Port, protocol=Protocol}) ->
+ State = #state{
+ host = Host,
+ port = Port,
+ is_ssl = (Protocol == https),
+ ssl_options = [{ssl_imp, new}]
+ },
+ put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
+ put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
{ok, State}.
%%--------------------------------------------------------------------
@@ -137,7 +147,7 @@ handle_call({send_req, {Url, Headers, Method, Body, Options, Timeout}},
handle_call(stop, _From, State) ->
do_close(State),
do_error_reply(State, closing_on_request),
- {stop, normal, ok, State};
+ {stop, normal, ok, State#state{socket=undefined}};
handle_call(Request, _From, State) ->
Reply = {unknown_request, Request},