bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [Bug-Wget] Wget closes connection despite Keep-Alive


From: Darshit Shah
Subject: [Bug-wget] [Bug-Wget] Wget closes connection despite Keep-Alive
Date: Tue, 4 Nov 2014 23:25:40 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

While looking at some debug output from Wget, I noticed that in case of a 416 Range Not Satisfiable response, Wget forces the connection close despite the fact that the server explicitly sent a `Connection: Keep-Alive` header.

Looking at the code, I found this at http.c:2775


     CLOSE_INVALIDATE (sock);        /* would be CLOSE_FINISH, but there
                                  might be more bytes in the body. */

I'm not sure what exactly we're trying to protect in this case. Why is CLOSE_INVALIDATE required instead of CLOSE_FINISH? If the server responds with a 416 status, there should be no more data in the stream and we should be able to
reuse that connection without any issues.

What am I missing here?


I wanted to write a test case to demonstrate this, but detecting a closed socket will take more than a quick test case. I'll sit down and write the required functionality to generate the relevant test case when I can.

--
Thanking You,
Darshit Shah

Attachment: pgppLbjhuRhet.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]