[jira] Commented: (COUCHDB-525) create_target replication option should work with OAuth

2009-10-13 Thread Jason Davies (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765279#action_12765279
 ] 

Jason Davies commented on COUCHDB-525:
--

Fixed in r824954.  Leaving this open for now as I need to add a test for this.

> 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
> Attachments: COUCHDB-525.patch
>
>
> 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.



[jira] Commented: (COUCHDB-525) create_target replication option should work with OAuth

2009-10-12 Thread Jan Lehnardt (JIRA)

[ 
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.