[Top][All Lists]

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

Re: [Bug-wget] Bug "-c" and "HTTP 405" - HEAD method not allowed

From: Ángel González
Subject: Re: [Bug-wget] Bug "-c" and "HTTP 405" - HEAD method not allowed
Date: Fri, 13 Sep 2013 17:54:04 +0200
User-agent: Thunderbird

On 13/09/13 11:43, Bykov Aleksey wrote:

Found possible bug.
If "-c" option is choosen but servers does not allow "HEAD" method, then Wget don't download anything.
Sorry, havent any ideas how to solve this.
1. Ignore 405 error and allow to download with "Range" - possible error with HTTP 416
2. Ignore 405 error and re-download whole file?
3. If 405 error then first try to download with "Range" headers, and if recieve 416 then try to download without "Range" May be exist variant to ask server what methods it can accept (and is whole server allow downloads resuming) before any actions?

Log fragment:

---request begin---
HEAD {address} HTTP/1.1
User-Agent: Wget/1.14.82-9ec3-dirty (mingw32)
Accept: */*
Host: {host}
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 405 Method Not Allowed
Date: Wed, 11 Sep 2013 21:31:41 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=6hmu8if8avpfvsstc9t44eqp06; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Server: Tefal Prima 15

This server doesn't seem too conformant... «The methods GET and HEAD MUST be supported by all general-purpose servers. All other methods are OPTIONAL; ... » -- https://tools.ietf.org/html/rfc2616#section-9.4 If you wanted to work around it, I would go with 3 (but is it worth?). The accepted methods (GET, POST) are given in the error response, there's no point in sending an OPTIONS first for this exceptional server.

reply via email to

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