I have a CouchDB server that is running behind a front end proxy which only allows GET, HEAD and OPTIONS requests. POST, PUT and DELETE are all disallowed.
When I set up replication on my local machine to pull from the remote server it works fine, until it reaches the end, when it tries to POST to /_ensure_full_commit. This returns a 401 Unauthorized response and causes the replication to crash, and restarts at the beginning.
Can I prevent CouchDB replication from calling /_ensure_full_commit or do I need to change the front end proxy configuration to allow POSTs to this url?
It looks like the replicator code just always tries to commit to BOTH servers as part of the replication checkpoint process: https://github.com/apache/couchdb/blob/master/src/couch_replicator/src/couch_replicator.erl#L695
So for now the quickest solution would be to fake a “success” response at the proxy level or simply pass that request through, especially since neither of us know whether it’s “necessary” or not.
But I’d also strongly encourage you to ask on the mailinglist and/or file a bug about this though — it seems strange that you can’t do a pull replication using only GET requests.
Update: Just remembered there’s a pretty significant rewrite of the replicator code that recently landed on the develop branch, so another consideration is to try out the new replicator in 1.2 first!