Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 44347 invoked from network); 12 Oct 2009 20:06:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Oct 2009 20:06:55 -0000 Received: (qmail 86480 invoked by uid 500); 12 Oct 2009 20:06:54 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 86404 invoked by uid 500); 12 Oct 2009 20:06:53 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 86394 invoked by uid 99); 12 Oct 2009 20:06:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 20:06:53 +0000 X-ASF-Spam-Status: No, hits=-10.0 required=5.0 tests=AWL,BAYES_00,FS_REPLICA,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 20:06:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 55A5F234C046 for ; Mon, 12 Oct 2009 13:06:31 -0700 (PDT) Message-ID: <1742649461.1255377991266.JavaMail.jira@brutus> Date: Mon, 12 Oct 2009 13:06:31 -0700 (PDT) From: "Jan Lehnardt (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-525) create_target replication option should work with OAuth In-Reply-To: <1564424188.1255359811476.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764809#action_12764809 ] Jan Lehnardt commented on COUCHDB-525: -------------------------------------- Adam, good call. This should do the trick: diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl index ba86374..69c640c 100644 --- a/src/couchdb/couch_rep_httpc.erl +++ b/src/couchdb/couch_rep_httpc.erl @@ -78,7 +78,11 @@ db_exists(Req, CanonicalUrl, CreateDB) -> undefined -> Headers0; {OAuthProps} -> - [oauth_header(Url, [], head, OAuthProps) | Headers0] + Method = case CreateDB of + true -> put; + _False -> head + end, + [oauth_header(Url, [], Method, OAuthProps) | Headers0] end, case CreateDB of true -> Do we have a test for that? > create_target replication option should work with OAuth > ------------------------------------------------------- > > Key: COUCHDB-525 > URL: https://issues.apache.org/jira/browse/COUCHDB-525 > Project: CouchDB > Issue Type: Bug > Affects Versions: 0.11 > Reporter: Adam Kocoloski > Assignee: Jan Lehnardt > Priority: Minor > > The new create_target option makes an HTTP request with an OAuth signature that assumes HEAD rather than PUT. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.