Archive for Linux

wget Read error (Connection reset by peer)

Problem:
HTTP request sent, awaiting response… Read error (Connection reset by peer) in headers. لعبة دومينو حقيقية
Retrying.

The linux command, wget, returns this error over and over again even though you can download the file just fine using a web browser.

Solution:
It turns out some webservers don’t like wget. Luckily, you can get around their dislike of wget by adding a switch to the command. Simply add –user-agent=Mozilla and you will be able to download the file.

Example:
change:
wget http://www.somewebsite.tld/somefile.pdf
to:
wget –user-agent=Mozilla http://www.somewebsite.tld/somefile.pdf

Comments