Redirection not working for the first time

0

There are output of curl command.

Sometimes my site doesn’t redirect properly, showing error page:

no data received from the server.

Is there any way to remove this error?

C:\Users\sumit>curl -kvI trip-smart.com
* Adding handle: conn: 0x2147e80
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2147e80) send_pipe: 1, recv_pipe: 0
* About to connect() to trip-smart.com port 80 (#0)
*   Trying 184.168.221.30...
* Connected to trip-smart.com (184.168.221.30) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: trip-smart.com
> Accept: */*
>
* Empty reply from server
* Connection #0 to host trip-smart.com left intact
curl: (52) Empty reply from server

C:\Users\sumit>curl -kvI trip-smart.com
* Adding handle: conn: 0x1dc7e80
* Adding handle: conn: 0x1dc7e80
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1dc7e80) send_pipe: 1, recv_pipe: 0
* About to connect() to trip-smart.com port 80 (#0)
*   Trying 184.168.221.30...
* Connected to trip-smart.com (184.168.221.30) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: trip-smart.com
> Accept: */*
>
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Cache-Control: max-age=900
Cache-Control: max-age=900
< Content-Type: text/html; charset=utf-8
Content-Type: text/html; charset=utf-8
< Location: http://www.trip-smart.com
Location: http://www.trip-smart.com
* Server Microsoft-IIS/7.5 is not blacklisted
< Server: Microsoft-IIS/7.5
Server: Microsoft-IIS/7.5
< X-AspNet-Version: 4.0.30319
X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
< Date: Thu, 08 Oct 2015 09:40:35 GMT
Date: Thu, 08 Oct 2015 09:40:35 GMT
< Content-Length: 142
Content-Length: 142
< Age: 47
Age: 47
< Connection: keep-alive
Connection: keep-alive

<
* Connection #0 to host trip-smart.com left intact

murarisumit

Posted 2015-10-09T04:00:30.210

Reputation: 151

I’m not able to recreate the error in Mac OS X running curl 7.28.1. Maybe adding the L option to follow links would help? Something like this: curl -kvIL trip-smart.com. But it might be something connected to your ISP connection and trip-smart.com. – JakeGould – 2015-10-09T04:08:47.700

@JakeGould, this behavior is at-times, mostly it redirectly me properly. Is this normal behavior? – murarisumit – 2015-10-09T04:26:11.690

No answers