[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [PATCH] wget hangs on HTTP 204
From: |
Tim Ruehsen |
Subject: |
[Bug-wget] [PATCH] wget hangs on HTTP 204 |
Date: |
Tue, 22 Apr 2014 15:02:24 +0200 |
User-agent: |
KMail/4.11.5 (Linux/3.13-1-amd64; KDE/4.11.5; x86_64; ; ) |
Attached is a patch including a new test case.
Guiseppe, I made it for a clone of Darshit's clone of Wget. Not sure if it
fits into master.
Tim
On Monday 21 April 2014 10:57:46 Joshua Pawlicki wrote:
> RFC 2616: "The 204 response MUST NOT include a message-body, and thus is
> always terminated by the first empty line after the header fields."
>
> So I would expect wget to terminate the connection immediately and write no
> file (or an empty file) when receiving a 204 response. However, it appears
> to attempt to keep the connection open and download a file that is not
> coming.
>
> I hope this isn't a duplicate - I couldn't find a post in about 204 in the
> archives, but it seems to be a widely known problem (
> https://www.google.com/search?q=wget+204 ).
>
> To reproduce:
> `wget --server-response http://cr-tools.clients.google.com/service/check2`
>
> bin$ ./wget --server-response
0001-fixed-204-response-handling-added-new-Test-204.px.patch
Description: Text Data