Hi Jakub Thanks for the inputs.... I did try the same command and same file from the windows PC and same version of curl.... The file upload was returned as successful. Kindly find the windows output attached....
On Wed, Dec 21, 2022, 12:19 Arun Jaganath <arunjagan...@gmail.com> wrote: > Does this mean that libcurl is expecting the server to read the data > completely once it sees 100 continue from the server? > > On Wed, Dec 21, 2022, 11:51 Zakrzewski, Jakub via curl-library < > curl-library@lists.haxx.se> wrote: > >> > I have a scenario where in when a file is uploaded to the server, if >> the file fully exists on the server with matching etag, the server >> responds back with a 200 and closes the connection without actually reading >> the data being uploaded. But unfortunately on libcurl this response is >> ignored and the broken pipe error is reported.... Is this a bug or is this >> working as expected, if so how do I handle such cases.... Any help is >> highly appreciated. Kindly find the curl verbose output attached... >> >> From my POV the server behaves weirdly - first it responds "100 Continue" >> and then basically just rudely interrupts the client and closes the >> connection. It should respond 2XX right away. >> -- >> Unsubscribe: https://lists.haxx.se/listinfo/curl-library >> Etiquette: https://curl.se/mail/etiquette.html >> >
$ curl -v -L --insecure "https://SERVER URL" -H "Authorization: Bearer xxxxx" -H "operationType: DownloadToGround" -H "subFolder: DATA//A429" -H "fileName:Test_A429_1212_2022_0.zip" -H "Content-range: bytes=32243713-38716748" -H "etag:b971816c37309fff5dc1a12c277f070725978c28274e4bf446a089e790b3794cc4ee2758f7644824823316c17ecc424da0e51937f455fbffb974240d3ee57d39" --data-binary @Test_A429_1212_2022_0.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 18.216.71.179:443... * Connected to server (18.216.71.179) port 443 (#0) * ALPN: offers h2 * ALPN: offers http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * TLSv1.3 (IN), TLS handshake, Server hello (2): { [122 bytes data] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): { [10 bytes data] * TLSv1.3 (IN), TLS handshake, Certificate (11): { [3189 bytes data] * TLSv1.3 (IN), TLS handshake, CERT verify (15): { [264 bytes data] * TLSv1.3 (IN), TLS handshake, Finished (20): { [52 bytes data] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): } [1 bytes data] * TLSv1.3 (OUT), TLS handshake, Finished (20): } [52 bytes data] * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN: server did not agree on a protocol. Uses default. * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Cisco Systems, Inc.; * start date: Dec 19 07:11:37 2022 GMT * expire date: Dec 24 07:11:37 2022 GMT * issuer: O=Cisco; CN=Cisco Umbrella Secondary SubCA mum1-SG * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. } [5 bytes data] > POST HTTP/1.1 > Host: server URL > User-Agent: curl/7.86.0 > Accept: */* > Authorization: Bearer <token> > operationType: DownloadToGround > subFolder: DATA//A429 > fileName:Test_A429_1212_2022_0.zip > Content-range: bytes=32243713-38716748 > etag:b971816c37309fff5dc1a12c277f070725978c28274e4bf446a089e790b3794cc4ee2758f7644824823316c17ecc424da0e51937f455fbffb974240d3ee57d39 > Content-Length: 38716748 > Content-Type: application/x-www-form-urlencoded > Expect: 100-continue > { [5 bytes data] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): { [249 bytes data] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): { [249 bytes data] * old SSL session ID is stale, removing { [5 bytes data] * Mark bundle as not supporting multiuse < HTTP/1.1 100 Continue } [5 bytes data] 98 36.9M 0 0 98 36.5M 0 2223k 0:00:17 0:00:16 0:00:01 1958k* We are completely uploaded and fine 100 36.9M 0 0 100 36.9M 0 1390k 0:00:27 0:00:27 --:--:-- 0{ [5 bytes data] * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Wed, 21 Dec 2022 07:12:04 GMT < Content-Length: 0 < Connection: keep-alive < X-Content-Type-Options: nosniff < X-XSS-Protection: 1; mode=block < Cache-Control: no-cache, no-store, max-age=0, must-revalidate < Pragma: no-cache < Expires: 0 < X-Frame-Options: DENY < Via: HTTP/1.1 m_proxy_mum1 < Via: HTTP/1.1 s_proxy_mum1 < 100 36.9M 0 0 100 36.9M 0 1369k 0:00:27 0:00:27 --:--:-- 0 * Connection #0 to host left intact $ curl --version curl 7.86.0 (x86_64-w64-mingw32) libcurl/7.86.0 OpenSSL/1.1.1s (Schannel) zlib/1.2.13 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.3 libssh2/1.10.0 nghttp2/1.51.0 Release-Date: 2022-10-26 Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI threadsafe TLS-SRP UnixSockets zstd
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html