How can I force wget.exe to talk HTTP/1.1?

4

I'm talking about Windows, not Linux.

I tried:

wget -O X:/test/some/dir/file.txt --tries=3 -c http://some.com/dir/data.txt
wget -O X:/test/some/dir/file.txt --tries=3 http://some.com/dir/data.txt
wget -O "X:/test/some/dir/file.txt" --tries=3 http://some.com/dir/data.txt

Result: Wget is talking "GET /dir/data.txt HTTP/1.0". Not HTTP/1.1. I want to force wget to use HTTP/1.1. How can I do this?

I am using WGET 1.11.4 for Windows (because there is no other newer version on the web).

Kerry

Posted 2014-03-22T13:26:08.550

Reputation: 41

have a look at --header argument for wget – phoops – 2014-03-22T13:33:56.267

@edvinas - Its a bad idea to pass an HTTP/1.1 header, if wget doesn't specifically support it. HTTP 1.1 introduces chunked encoding which is likely to result in truncated downloads when operating in HTTP 1.0 mode – carpii – 2014-03-22T17:27:14.517

Consider switching to cURL. – Spiff – 2014-03-22T21:41:39.147

Answers

5

It appears HTTP 1.1 is not supported in your version. From http://en.wikipedia.org/wiki/Wget:

Wget 1.13, released August 2011, supports HTTP/1.1, fixed some portability issues, and used the GnuTLS library by default for secure connections.[12]

Can you get a newer version of wget on Windows via Cygwin?

https://stackoverflow.com/questions/16675977/where-is-cygwins-wget

Brian Adkins

Posted 2014-03-22T13:26:08.550

Reputation: 1 721