diff options
-rw-r--r-- | src/couchdb/couch_rep_httpc.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl index 14219781..35334225 100644 --- a/src/couchdb/couch_rep_httpc.erl +++ b/src/couchdb/couch_rep_httpc.erl @@ -60,9 +60,16 @@ db_exists(Req) -> db_exists(Req, CanonicalUrl) -> #http_db{ - url = Url, - headers = Headers + auth = Auth, + headers = Headers0, + url = Url } = Req, + Headers = case proplists:get_value(<<"oauth">>, Auth) of + undefined -> + Headers0; + {OAuthProps} -> + [oauth_header(Url, get, OAuthProps) | Headers0] + end, case catch ibrowse:send_req(Url, Headers, head) of {ok, "200", _, _} -> Req#http_db{url = CanonicalUrl}; |