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