in reply to Re: (dkubb) Re: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
in thread to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.

Perhaps something has changed in all these years: using PERL 5.14 and Apache virtual hosting all of these gives you a different result:

$CGI->virtual_host() returns DNS name ex. www.my.address.com $ENV{'SERVER_NAME'} returns "localhost" $ENV{'HTTP_HOST'} returns "localhost:8001"

The actual values of course depends on you environment setting.

  • Comment on Re^3: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
  • Download Code