Re: Question: Why is a dedicated Webpage not working in cURL
Date: Wed, 1 Jul 2020 18:32:33 +0200
On Wed, Jul 01, 2020 at 05:23:03PM +0200, Mac-Fly via curl-users wrote:
> When I open that page in any browser (I tried Chrome, IE, Firefox and Edge) it works. But if I run:
> curl.exe https://www.amd.com/en/support
>
> I get:
> <HTML><HEAD>
> <TITLE>Access Denied</TITLE>
> </HEAD><BODY>
> <H1>Access Denied</H1>
>
> You don't have permission to access "http://www.amd.com/en/support" on this server.<P>
> Reference #18.edd47b5c.1593616789.17e4692c
> </BODY>
> </HTML>
>
> What could be the reason for such?
>
Assuming the response is from the server and not from a proxy, you would have
to ask AMD how they dare to discriminate user agents based on the request
headers. (Especially when discrimination is a hot topic now in the U.S.) E.g.
this works for me:
curl --verbose --user-agent Mozilla --header 'Accept-Encoding: identity' --header 'Connection: Keep-Alive' https://www.amd.com/en/support
But changing the --user-agent into curl or wget makes the server not to
response.
-- Petr
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: signature.asc