Try adding -L parameter to your curl command (follow location).

-----Original Message-----
From: P Kaliyamurthy [mailto:pkaliyamur...@gmail.com] 
Sent: Tuesday, August 07, 2012 2:45 PM
To: dev@trafficserver.apache.org
Subject: Setting up ATS as a forward proxy.

Hi,

I want to set up ATS as a forward proxy for npmjs.org.  I add this line to the 
records.config

map  http://mynode:8000/ https://npmjs.org/

and added some storage in the storage.config.


I started ATS. When I do "curl -v http://mynode:8000";, I am getting a 302.


< HTTP/1.1 301 Moved Permanently
< location: https://npmjs.org/
< Date: Tue, 07 Aug 2012 18:15:22 GMT
< Age: 70
< Content-Length: 65
< Connection: keep-alive
< Server: ATS/3.2.0
<
<html>Moved: <a href="https://npmjs.org/";>https://npmjs.org/</a>


I want ATS to follow the redirect and get me the actual content from npmjs.org. 
Can you please let me know, what I am missing.

Note:
If I enter http://mynode:8000/ in a brower, I getting the page I want as the 
browser is redirecting properly.

Thank you in advance.

--
Prabhakhar

Reply via email to