Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > request.getHeader("Host") returns wrong host name

Thread Tools

request.getHeader("Host") returns wrong host name

Posts: n/a
We've deployed a website on a server exposed to the internet through
our firewall. IIS handles the pass-off to Resin 2.0.4, and has worked
flawlessly on other applications configured the same way.

The problem is for some reason when we come into the site externally
from a URL like this:

Every place in the code that does a request.getHeader("Host") returns
"internalmachinename" instead of ""

Has anyone seen this before? Because a servlet we use depends on the
fully qualified URL, we need to be able to grab the correct host when
constructing some links.

Thanks in advance.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[os.path.join(r'E:\Python', name) for name in []] returns [] iMath Python 9 01-30-2013 02:17 AM returns old AD user name Antonio O''Neal ASP .Net Security 5 11-03-2008 12:27 PM
Client Machine Name or Host name ? Anil G Java 4 01-31-2008 04:10 PM
How To: Allow For Accessing site By Only the Domain Name, Without the Host Name? Joey ASP .Net 0 09-15-2005 03:04 AM
ASP.NET User.Identity.Name returns wrong value? JohnH. ASP .Net Security 5 03-22-2005 09:09 PM