29 August 2019
Written by Guillermo Gómez Savino
This post is about a simple case of what’s going on here type of situation.
The phenomena:
curl works
wget fails
Let try to see the http request details:
curl --verbose
wget --debug
Pay attention and read
Actually this case is no bug at all or missbehaviour of the web server, let review some details:
- Both wget and curl reports HTTP response status code 403 Forbidden.
- curl show some html content.
- wget does not show such content, so the issue is with wget behaviour.
Reading further about wget:
--content-on-error
If this is set to on, wget will not skip the content when the server responds with a http
status code that indicates error.
So voilá, this is no mistery, just add --content-on-error
option to get the same content as curl does.
tags: linux - debug - http