Corrupt REMOTE_HOST variable

Trevor Phillips (phillips@central.murdoch.edu.au)
Thu, 14 Jan 1999 15:32:52 +0800


I've started using libwww for things like watchdogs, and proxies, where a perl
script gets a remote URL for one reason or another. I've noticed some very
strange side-effects concerning the REMOTE_HOST environment variable.
Using lwp-request (or any other libwww Perl script getting a remote HTTP
page), and getting a CGI which prints out the environment variables, I am
seeing one of the following:
   - Set to the correct name
   - Set to the start of the name, followed by garbage
   - Not set at all

It also behaves differently on different machines I try. Out of four machines,
all Sun Solaris 2.6 boxes, two of them get the corruption, SOME of the time.
Both these machines have multiple IP addresses, and may use a different one
each time. The one that doesn't set ANY value only has one IP. The fourth also
has multi-IP's, and returns a correct name each time, altho often for
different IP's.

What's going on here with the corruption? To my knowledge all the machines
have their multi-ip's configured the same way both Machine-side and in the
DNS.

The corruption also seems to be part of an Agent string, such as:
"REMOTE_HOST=machname-0.in95; I ;Nav)".

Is there any way to override the REMOTE_HOST/ADDR settings lwp uses??

Thanks in advance ...

-- 
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ . 
: CWIS Technical Officer         -           T.Phillips@murdoch.edu.au : 
| IT Services                       -               Murdoch University | 
 >------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /