WGET not working but CURL works on the same address/host?

2

WGET give me this error:

HTTP request sent, awaiting response... 403 Forbidden 2015-11-23 12:07:06 ERROR 403: Forbidden.

If I try the same URL (it’s an internal network Apache server, firewall isn’t blocking) with CURL the download works fine. I’m using the basic parameters, port 80… just WGET and the URL.

I have no log error in HTTPD at server which contains the file (.bin).

Hope someone could help because I use a lot of WGET commands in scripts there is already running in some machines.

treskilimei

Posted 2015-11-23T16:18:54.247

Reputation: 21

What gives curl -IL <URI>? – JohannesM – 2015-11-23T16:23:38.697

[root@p57065 tmp]# curl -IL int.myhost.com/pacotes/linuxupdate.bin HTTP/1.0 403 Forbidden Server: squid/2.7.STABLE7 Date: Mon, 23 Nov 2015 16:39:09 GMT Content-Type: text/html Content-Length: 4519 X-Squid-Error: ERR_ACCESS_DENIED 0 X-Cache: MISS from ajax.caxias.rs.gov.br X-Cache-Lookup: NONE from int.myhost.com:3128 Via: 1.0 ajax.caxias.rs.gov.br:3128 (squid/2.7.STABLE7) Connection: close – treskilimei – 2015-11-23T16:40:26.623

That's weird. You are getting a 403 with curl too. Is the output really the linuxupdate.bin? (md5sum) – JohannesM – 2015-11-23T17:07:28.687

yes if i try curl -O "URL" it downloads 100% and the file is at folder... – treskilimei – 2015-11-23T17:14:42.443

Try it with an additional header: wget --header="Host: int.myhost.com" <URI> – JohannesM – 2015-11-23T17:43:08.123

1Maybe the server is checking User-Agent, and allows curl, but not wget. – Barmar – 2015-11-23T20:35:08.290

No answers