From 1e7bdb1d04b074d69753f4beab8c667e3cb11852 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Mon, 18 Apr 2011 09:44:59 +0000 Subject: 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 --- src/couchdb/couch_rep.erl | 11 ++++++++--- 1 file 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 -> []; -- cgit v1.2.3