I have a host which is only reachable via IPv6. While I can connect to a CouchDB running on this host just fine, I cannot replicate my database to it.
This is due to the inet6-option missing from the gen_tcp.connect() call. I will attach a patch which fixes the issue.
To test it, you can use a host which only has an AAAA record in the DNS. CouchDB will immediately return 404 if you want to replicate to it unless you add the inet6 option.