On 31/12/2020 16:30, Mac-Fly via curl-library wrote: > Dear all, > > amazon.com was working just fine with cURL until > yesterday. When I issue: > > curl.exe -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; > rv:59.0) > Gecko/20100101 Firefox/59.0" https://www.amazon.com -o > "out.html" > > ...I get binary garbage in the "out.html" file. > Note that I even tried to "hide" cURL by using a Mozilla > user-string. > Also note that this applies to amazon.com ONLY. all other > pages I tried > are working properly. > > What could be the reason for that behaviour?
Per the headers, it's gzip-encoded. If you output to out.html.gzip, then unzip, it'll be fine. I don't know why this just happened. I would have thought curl would auto decode the contents to be honest. curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets Tom ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html