eiri opened a new pull request #3712:
URL: https://github.com/apache/couchdb/pull/3712


   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from 
committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   While including a payload within a DELETE request is not forbidden by 
[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5) its 
presence on a delete attachment request leaves a mochiweb's acceptor in a 
semi-opened state since mochiweb's using lazy load for the request bodies.
   This makes _a next_ immediate request to the same acceptor to hung until the 
previous request's receive timeout.
   
   This PR adds a step to explicitly "drain" and discard an entity body on a 
delete attachment request to prevent that.
   
   ## Testing recommendations
   
   Isolated test:
   
   `make elixir tests=test/elixir/test/attachments_test.exs:127`
   
   or manual test described in related issue
   
   ## Related Issues or Pull Requests
   
   #3692 
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in 
https://github.com/apache/couchdb-documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to