URL: <https://savannah.gnu.org/bugs/?60289>
Summary: wget --continue: Range header is included in other options' HEAD requests Project: GNU Wget Submitted by: None Submitted on: Thu 25 Mar 2021 03:14:57 PM UTC Category: Program Logic Severity: 3 - Normal Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Name: Clayton M. Originator Email: charibla...@gmail.com Open/Closed: Open Release: None Discussion Lock: Any Operating System: None Reproducibility: Every Time Fixed Release: None Planned Release: None Regression: None Work Required: None Patch Included: No _______________________________________________________ Details: If --continue/-c is combined with an option that (first) sends a HEAD request, a Range header is unnecessarily included and the server might respond with 416 Requested Range Not Satisfiable. Including Range would be expected if it was manually included with --header, but I think since -c is for downloading it should only affect specifically GET requests. Test with Wget 1.21.1: $ wget https://www.nirsoft.net/utils/downtester.zip $ touch --date="2010-01-01" downtester.zip # Remote file is timestamped 2013 $ wget -d --continue --timestamping --no-if-modified-since https://www.nirsoft.net/utils/downtester.zip (replace older local file, else continue partially completed download) Excerpt of output: ---request begin--- HEAD /utils/downtester.zip HTTP/1.1 Range: bytes=63701- User-Agent: Wget/1.21.1 Accept: */* Accept-Encoding: identity Host: www.nirsoft.net Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... ---response begin--- HTTP/1.1 416 Requested Range Not Satisfiable Date: Thu, 25 Mar 2021 01:42:27 GMT Server: Apache Keep-Alive: timeout=4, max=50 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 ---response end--- _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60289> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/