Author: fdmanana
Date: Mon Apr 18 09:44:05 2011
New Revision: 1094419
URL: http://svn.apache.org/viewvc?rev=1094419&view=rev
Log:
Replicator: fix proxy feature after upgrading ibrowse to version 2.2.0
Modified:
couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
Modified: couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
URL:
http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_rep.erl?rev=1094419&r1=1094418&r2=1094419&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_rep.erl Mon Apr 18 09:44:05 2011
@@ -18,6 +18,7 @@
-export([replicate/2, checkpoint/1]).
-include("couch_db.hrl").
+-include("../ibrowse/ibrowse.hrl").
-record(state, {
changes_feed,
@@ -794,9 +795,13 @@ parse_proxy_params(ProxyUrl) when is_bin
parse_proxy_params([]) ->
[];
parse_proxy_params(ProxyUrl) ->
- {url, _, Base, Port, User, Passwd, _Path, _Proto} =
- ibrowse_lib:parse_url(ProxyUrl),
- [{proxy_host, Base}, {proxy_port, Port}] ++
+ #url{
+ host = Host,
+ port = Port,
+ username = User,
+ password = Passwd
+ } = ibrowse_lib:parse_url(ProxyUrl),
+ [{proxy_host, Host}, {proxy_port, Port}] ++
case is_list(User) andalso is_list(Passwd) of
false ->
[];