0

I'm trying to download this file: http://www.macupdate.com/download/49646/privatus.dmg

It gives me 302 http code, so, I get Location Header and go by a new address: http://sweetpproductions.com/products/privatus/Privatus.dmg

But new link gives me 406 http code with this headers:

"Date" "Mon, 27 Oct 2014 14:24:32 GMT"
"Content-Type" "text/html; charset=iso-8859-1"
"Transfer-Encoding" "chunked"
"Connection" "keep-alive"
"Set-Cookie" "__cfduid=da76029364799a83265f7f215bbddef491414419872061; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.sweetpproductions.com; HttpOnly"
"Server" "cloudflare-nginx"
"CF-RAY" "17ff8ec8633f0893-FRA"

and with body:

<head><title>Not Acceptable!</title></head><body><h1>Not Acceptable!</h1><p>An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.</p></body></html>

I tried to set Accept header to Content-Type and Accept-Date to Date but it doesn't help. Returning code is always 406. But browsers can download this file. So, how to omit this error and download file?

Robotex
  • 1,064
  • 6
  • 17
  • 41

1 Answers1

0

I am not sure what are the exact headers you are sending. May be you can try adding user-agent(of some registered device) or better just compare the request headers of any browser(like chrome) with those of your application.

shobhita
  • 44
  • 1
  • 3
  • How to get browser's headers? I tried to do it in Chrome Developer Tools and Firebug, but it not shows this query. – Robotex Oct 29 '14 at 18:57
  • Press F12 on chrome or mozilla. It will open inspect element. Go to network Tab. Now, load your site. All the network requests can be seen in the inspect element( with Request, response etc ). You can check the headers there. – shobhita Oct 31 '14 at 09:26