From ab71069d36708d68206b79d97affce03173366b7 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sun, 23 Aug 2009 14:51:24 +0000 Subject: fix HEAD requests for OAuth, patch by Jason Davies, closes COUCHDB-479 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@806983 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_oauth.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_httpd_oauth.erl b/src/couchdb/couch_httpd_oauth.erl index f542a989..ee79c797 100644 --- a/src/couchdb/couch_httpd_oauth.erl +++ b/src/couchdb/couch_httpd_oauth.erl @@ -16,11 +16,11 @@ -export([oauth_authentication_handler/1, handle_oauth_req/1, consumer_lookup/2]). % OAuth auth handler using per-node user db -oauth_authentication_handler(#httpd{method=Method}=Req) -> +oauth_authentication_handler(#httpd{mochi_req=MochiReq}=Req) -> serve_oauth(Req, fun(URL, Params, Consumer, Signature) -> AccessToken = proplists:get_value("oauth_token", Params), TokenSecret = couch_config:get("oauth_token_secrets", AccessToken), - case oauth:verify(Signature, atom_to_list(Method), URL, Params, Consumer, TokenSecret) of + case oauth:verify(Signature, atom_to_list(MochiReq:get(method)), URL, Params, Consumer, TokenSecret) of true -> set_user_ctx(Req, AccessToken); false -> -- cgit v1.2.3