Return-Path: Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: (qmail 33291 invoked from network); 1 Sep 2010 20:56:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Sep 2010 20:56:29 -0000 Received: (qmail 22864 invoked by uid 500); 1 Sep 2010 20:56:29 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 22773 invoked by uid 500); 1 Sep 2010 20:56:28 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 22765 invoked by uid 99); 1 Sep 2010 20:56:28 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 20:56:28 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [67.195.14.109] (HELO smtp106.sbc.mail.gq1.yahoo.com) (67.195.14.109) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Sep 2010 20:56:06 +0000 Received: (qmail 54414 invoked from network); 1 Sep 2010 20:55:45 -0000 Received: from TW-MBP13-SJiang.local (sjiang@174.46.233.130 with plain) by smtp106.sbc.mail.gq1.yahoo.com with SMTP; 01 Sep 2010 13:55:44 -0700 PDT X-Yahoo-SMTP: LMlfc8KswBCQPRASDKZGlif.h0t4NsFjKl8zV82_tWV_obiJ X-YMail-OSG: rAkK4aAVM1lLJ3tlhEQJ0jO2hi6e4p2nYxXf7iwVGjaDImM GaKBB7fqliEwrKN0HE31b6Nh8e5s.uhGMdc8J8m7a8eH4NWq0CVfgLK9Zmw8 hJTgIhlwtW5zgSvUYOULuMm4BZGHRH_IoQITxTV8DIITYG4o5N0lZ0V1mJXe IoaD3u.hdVz.6Ry7EfSw5R9gS1fgnNlmlA7eFcvmNnoIwlkNyEPLjKYmfldK ZcWuTDcfMo4dQ4kDFFt1.7O737v97cCs1f.m_fZ2SvCNP7dg24TqQEPqvYt6 D X-Yahoo-Newman-Property: ymail-3 Message-ID: <4C7EBDCA.3080809@apache.org> Date: Wed, 01 Sep 2010 13:55:38 -0700 From: Steve Jiang User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: users@trafficserver.apache.org Subject: Re: Preventing host headers from changing in forward proxy mode References: <994E05D2-4BCA-41E0-93ED-19969FCD4875@strangeloopnetworks.com> In-Reply-To: <994E05D2-4BCA-41E0-93ED-19969FCD4875@strangeloopnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Greg, TS is checking the request-URI 's host matches the host header and modifying the header if it does not to avoid content spoofing. There's an option that isn't in the default records.config that controls this: CONFIG proxy.config.http.avoid_content_spoofing INT 1 Can you try adding that to your config file and setting it to 0? That should give the behavior that you want. Keep in mind TS will use the host header when matching for items in cache if you have that enabled. --Steve Greg Smolyn wrote: > Hi, > we've decided to use traffic server as a cache for a background process that does a bunch of fetching. Admittedly we're doing something a bit non standard, but we're having troubles trying to configure the system such that it doesn't modify host headers on us. > > Here's the scenario: > - trafficserver is listening on 127.0.0.1:8080 > - we have a number of local VIPs on our machine that we use as aliases for real backend servers, so, if we want to fetch http://www.foo.com/test.jpg, we would go through it's VIP at, say, 10.0.1.1 > > What happens with trafficserver in the mix is: > - we open TCP connection to 127.0.0.1:8080 and does a GET http://10.0.1.1/test.jpg with Host: www.foo.com > - trafficserver then requests on 10.0.1.1 a GET /test.jpg, with Host: 10.0.1.1 > > What we really need is the original Host header in the proxied request. > > We've tried turning on proxy.config.url_remap.pristine_host_hdr (setting it to 1), however this does nothing. > > Any suggestions? Or are we going to have to write a plugin? And if so, which is a good plugin sample to start from? > > Thanks! > > -greg >