|Just another Perl shrine|
$base_url special meaning?by punch_card_don (Curate)
|on Nov 04, 2010 at 17:12 UTC||Need Help??|
punch_card_don has asked for the
wisdom of the Perl Monks concerning the following question:
Scratching my head over this. This snippet is in a script accessed over the web:
which usually correctly produces
But one user is accessing my script through a proxy server. (EZProxy, what else?) When they access it, they get:
The variable $base_url is hard-coded in the script. The fact of coming from a proxy server should have zero effect on that. Now, this script uses only one module, CGI.
Am I unwittingly referencing a special variable or something that's overridding my hard-coded value?
Immediately following the above snippet, there comes:
where "called_from" is the url of the referring page that called the script, set earlier in the script. Again, when I access it, it correctly outputs:
but when my proxied friend tries it, they get
So, OK, I don't get why it's substituting their proxy domain for the hard-coded $base_url - but considering the value of $called_from, url_parts1 should have been the same mysubfolder/mypage.htm as I get - no? Makes me think there's really something weird going on with this $base_url variable.
Time flies like an arrow. Fruit flies like a banana.