summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-04-18 09:44:59 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-04-18 09:44:59 +0000
commit1e7bdb1d04b074d69753f4beab8c667e3cb11852 (patch)
treeaf9ac36fdb400888d6ad5304ea220243f3c57f87 /src/couchdb/couch_rep.erl
parenta8a853e065125b6229aa4db88d1fc908772bd114 (diff)
Merged revision 1094419 from branch 1.0.x
Replicator: fix proxy feature after upgrading ibrowse to version 2.2.0 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1094420 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r--src/couchdb/couch_rep.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index 217d8efe..c38fe529 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -22,6 +22,7 @@
-include("couch_db.hrl").
-include("couch_js_functions.hrl").
+-include("../ibrowse/ibrowse.hrl").
-define(REP_ID_VERSION, 2).
@@ -849,9 +850,13 @@ parse_proxy_params(ProxyUrl) when is_binary(ProxyUrl) ->
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 ->
[];