3

The following returns a gateway timeout on my vps (debian, squeeze)

 curl --head http://www.flipkart.com/
 HTTP/1.1 504 Gateway Timeout

But works fine i.e gives a 302 HTTP on my home computer. So I guess something is wrong in my vps settings. But what?

The same command was working fine yesterday.

Help!

Edit: PHP-cURL throws a 504 as well, which is how this problem was discovered..

Edit2: Other sites work just fine though:

 curl --head https://google.com 

Edit3: I can successfully ping to flipkart.com

gyaani_guy
  • 171
  • 1
  • 1
  • 8

1 Answers1

2

Figured it out!! It was giving 504 when curl tries to resolve to ipv6

On comparing the requests, the only difference was the ip address.

So I tried forcing ipv4 resolving via

curl -4 --head  http://www.flipkart.com

and it worked!

gyaani_guy
  • 171
  • 1
  • 1
  • 8