curl / Mailing Lists / curl-library / Single Mail

curl-library

Transfer completion is not reported if 200 for GET has body and has no Content-Length header

From: Novoseltsev, Igor via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 8 Aug 2017 15:53:01 +0000

Hello folks,

I encountered issue while using libcurl 7.54.1 on Win7 (though OS does not matter).

My application sends GET and receives 200 with body in response.
The 200 response has no Content-Length header.
That causes libcurl not to report DONE for the Easy, even whole body was reed from socket.

To indicate end of body the server closes connection.
Looks like it is completely fine according standard:

RFC 2616 (the HTTP 1.1 standard),
4.4 Message Length
...
When a message-body is included with a message, the
   transfer-length of that body is determined by one of the following
   (in order of precedence):
....
   5.By the server closing the connection. (Closing the connection
     cannot be used to indicate the end of a request body, since that
     would leave no possibility for the server to send back a response.)

Does anybody encountered that issue?
Is it flaw indeed or I missed some configuration option?
Should I try to fix it and submit fix for review?

Thanks,
Igor

Spirent Communications e-mail confidentiality.
------------------------------------------------------------------------
This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.

Spirent Communications plc
Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Tel No. +44 (0) 1293 767676
Fax No. +44 (0) 1293 767677

Registered in England Number 470893
Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.

Or if within the US,

Spirent Communications,
27349 Agoura Road, Calabasas, CA, 91301, USA.
Tel No. 1-818-676- 2300

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-08-08