From 6c6db011c2064597526c6f36878a282238dd2bf2 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Mon, 27 Sep 2010 19:14:37 +0000 Subject: Replacing calls to couch_util:get_value with ?getv git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1001879 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_httpc.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/couchdb/couch_rep_httpc.erl') diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl index 06d4748a..0b5b5328 100644 --- a/src/couchdb/couch_rep_httpc.erl +++ b/src/couchdb/couch_rep_httpc.erl @@ -34,7 +34,7 @@ do_request(Req) -> qs = QS } = Req, Url = full_url(Req), - Headers = case couch_util:get_value(<<"oauth">>, Auth) of + Headers = case ?getv(<<"oauth">>, Auth) of undefined -> Headers0; {OAuthProps} -> @@ -76,7 +76,7 @@ db_exists(Req, CanonicalUrl, CreateDB) -> url = Url } = Req, HeadersFun = fun(Method) -> - case couch_util:get_value(<<"oauth">>, Auth) of + case ?getv(<<"oauth">>, Auth) of undefined -> Headers0; {OAuthProps} -> @@ -190,7 +190,7 @@ process_response({error, Reason}, Req) -> redirected_request(Req, RedirectUrl) -> {Base, QStr, _} = mochiweb_util:urlsplit_path(RedirectUrl), QS = mochiweb_util:parse_qs(QStr), - Hdrs = case couch_util:get_value(<<"oauth">>, Req#http_db.auth) of + Hdrs = case ?getv(<<"oauth">>, Req#http_db.auth) of undefined -> Req#http_db.headers; _Else -> @@ -220,11 +220,11 @@ oauth_header(Url, QS, Action, Props) -> % erlang-oauth doesn't like iolists QSL = [{couch_util:to_list(K), ?b2l(?l2b(couch_util:to_list(V)))} || {K,V} <- QS], - ConsumerKey = ?b2l(couch_util:get_value(<<"consumer_key">>, Props)), - Token = ?b2l(couch_util:get_value(<<"token">>, Props)), - TokenSecret = ?b2l(couch_util:get_value(<<"token_secret">>, Props)), - ConsumerSecret = ?b2l(couch_util:get_value(<<"consumer_secret">>, Props)), - SignatureMethodStr = ?b2l(couch_util:get_value(<<"signature_method">>, Props, <<"HMAC-SHA1">>)), + ConsumerKey = ?b2l(?getv(<<"consumer_key">>, Props)), + Token = ?b2l(?getv(<<"token">>, Props)), + TokenSecret = ?b2l(?getv(<<"token_secret">>, Props)), + ConsumerSecret = ?b2l(?getv(<<"consumer_secret">>, Props)), + SignatureMethodStr = ?b2l(?getv(<<"signature_method">>, Props, <<"HMAC-SHA1">>)), SignatureMethodAtom = case SignatureMethodStr of "PLAINTEXT" -> plaintext; -- cgit v1.2.3