ricellis commented on issue #1943:
URL: https://github.com/apache/couchdb/issues/1943#issuecomment-741839742


   I just ran into this issue as well, initially using my Java client, but 
reproduced in curl too.
   
   The 
[mp-request.mp.gz](https://github.com/apache/couchdb/files/5666675/mp-request.mp.gz)
 file I'm using is the [docs 
example](https://docs.couchdb.org/en/stable/api/document/common.html#creating-multiple-attachments)
 but with only 1 of the attachments instead of both.
   
   Curl multipart request that works (curl automatically adds the 
`Content-Length` header):
   `curl -v -u 'admin:**' -X PUT -H 'Content-Type: multipart/related; 
boundary=abc123' -T mp-request.mp 'http://localhost:5984/test/testmp4'`
   ```
   *   Trying ::1...
   * TCP_NODELAY set
   * Connected to localhost (::1) port 5984 (#0)
   * Server auth using Basic with user 'admin'
   > PUT /test/testmp4 HTTP/1.1
   > Host: localhost:5984
   > Authorization: Basic **==
   > User-Agent: curl/7.64.1
   > Accept: */*
   > Content-Type: multipart/related; boundary=abc123
   > Content-Length: 373
   > Expect: 100-continue
   > 
   * Done waiting for 100-continue
   * We are completely uploaded and fine
   < HTTP/1.1 201 Created
   < Cache-Control: must-revalidate
   < Content-Length: 70
   < Content-Type: application/json
   < Date: Wed, 09 Dec 2020 14:42:36 GMT
   < ETag: "1-7ce5f48fde00bce2167f25fd04031e8e"
   < Location: http://localhost:5984/test/testmp4
   < Server: CouchDB/3.1.1 (Erlang OTP/20)
   < X-Couch-Request-ID: 31cddc5df6
   < X-CouchDB-Body-Time: 0
   < 
   {"ok":true,"id":"testmp4","rev":"1-7ce5f48fde00bce2167f25fd04031e8e"}
   ```
   
   And curl request with added `Transfer-Encoding: chunked` header that hangs:
   `curl -v --max-time 30 -u 'admin:**' -X PUT -H 'Transfer-Encoding: chunked' 
-H 'Content-Type: multipart/related; boundary=abc123' -T mp-request.mp 
'http://localhost:5984/test/testmp3'`
   ```
   *   Trying ::1...
   * TCP_NODELAY set
   * Connected to localhost (::1) port 5984 (#0)
   * Server auth using Basic with user 'admin'
   > PUT /test/testmp3 HTTP/1.1
   > Host: localhost:5984
   > Authorization: Basic **==
   > User-Agent: curl/7.64.1
   > Accept: */*
   > Transfer-Encoding: chunked
   > Content-Type: multipart/related; boundary=abc123
   > Expect: 100-continue
   > 
   * Done waiting for 100-continue
   * Signaling end of chunked upload via terminating chunk.
   * Operation timed out after 30002 milliseconds with 0 bytes received
   ```


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

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


Reply via email to