Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 58301 invoked from network); 1 Mar 2006 19:13:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Mar 2006 19:13:42 -0000 Received: (qmail 84842 invoked by uid 500); 1 Mar 2006 19:14:28 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 84766 invoked by uid 500); 1 Mar 2006 19:14:28 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 84690 invoked by uid 99); 1 Mar 2006 19:14:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 11:14:27 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [13.13.138.218] (HELO wbmler3.mail.xerox.com) (13.13.138.218) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 11:14:26 -0800 Received: from wbmlir3.mail.xerox.com (wbmlir3.mail.xerox.com [13.131.8.223]) by wbmler3.mail.xerox.com (8.13.4/8.13.1) with ESMTP id k21JE4ld021642 for ; Wed, 1 Mar 2006 14:14:04 -0500 Received: from wbmlir3.mail.xerox.com (localhost [127.0.0.1]) by wbmlir3.mail.xerox.com (8.13.4/8.13.1) with ESMTP id k21JDKZQ014521 for ; Wed, 1 Mar 2006 14:13:20 -0500 Received: from usa7061gw02.na.xerox.net (usa7061gw02.na.xerox.net [13.151.32.4]) by wbmlir3.mail.xerox.com (8.13.4/8.13.1) with ESMTP id k21JDEYk014451 for ; Wed, 1 Mar 2006 14:13:20 -0500 Received: from usa0300ms03.na.xerox.net ([13.135.34.12]) by usa7061gw02.na.xerox.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 1 Mar 2006 11:13:13 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: How to overwrites Host header Date: Wed, 1 Mar 2006 14:13:07 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to overwrites Host header thread-index: AcY9US0UeNupbWNKQLm2G6ywR+mNMwAErGbw From: "Satsangi, Vivek " To: "HttpClient User Discussion" X-OriginalArrivalTime: 01 Mar 2006 19:13:13.0153 (UTC) FILETIME=[2F9DC310:01C63D64] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Suppose the hostname you DON't WANT is bar.sun.com You can then fake it out by=20 A) Creating an entry in /etc/hosts for the name you want it to be. Suppose this is foo.sun.com. Point foo.sun.com to the IP address of bar.sun.com. B) Only call the host by the name foo.fun.com. Then the host header in the request will show foo.sun.com, while getting sent to bar.sun.com. =20 -----Original Message----- From: otsuka [mailto:t.otsuka@gmail.com]=20 Sent: Wednesday, March 01, 2006 11:55 AM To: httpclient-user@jakarta.apache.org Subject: How to overwrites Host header Hi, I want HttpClient to send "Host" request header value which is different with the host connected. This behaviour is necessary for authentication purpose. Is it possible to overwrites Host header? If yes, could you tell me how? (my desired behaviour log) DEBUG org.apache.commons.httpclient.HttpConnection - Open connection to www.example.com:80 DEBUG httpclient.wire.header - >> "POST /path/to/something HTTP/1.1[\r][\n]" DEBUG httpclient.wire.header - >> "Host: another.example.com[\r][\n]" Regards, Otsuka --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org