Description
This is related COUCHDB-2833.
This was found investigating the failure of replication tests. Specifically couch_replicator_large_atts_tests, the
{local, remote}sub-case.
The test sets up push replications from local to remote.
Replication workers have more than 1 document larger than MAX_BULK_ATT_SIZE=64K. They start pushing them to the target, using a keep-alive connection (default for HTTP 1.1), the first few pipelined requests will go through using the same connection, then server will accept the first PUT to …/docid?edits=false, then return Connection:close and close the connection after the 201 Created result.
Server should not close request too early and instead keep it open longer.