<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HTTP_REFERER gets undefined in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603219#M68744</link>
    <description>Hi Matti,&lt;BR /&gt;I decided to get the information I needed from a source other that HTTP_REFERER, as it seems to be unreliable for my purposes.&lt;BR /&gt;Thanks in anycase, and points are due.&lt;BR /&gt;Bye,&lt;BR /&gt;Ron.</description>
    <pubDate>Wed, 17 Aug 2005 11:20:31 GMT</pubDate>
    <dc:creator>Ron Barak</dc:creator>
    <dc:date>2005-08-17T11:20:31Z</dc:date>
    <item>
      <title>HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603212#M68737</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I need to solve a problem in Perl/5.8.0 vis-a-vis Apache/2.0.40.&lt;BR /&gt;&lt;BR /&gt;I have a Perl CGI script that calls another Perl CGI script. &lt;BR /&gt;In the first script HTTP_REFERER is defined, but once the second script is called, HTTP_REFERER gets undefined.&lt;BR /&gt;&lt;BR /&gt;Any idea why this is happening ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ron.</description>
      <pubDate>Sat, 13 Aug 2005 07:36:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603212#M68737</guid>
      <dc:creator>Ron Barak</dc:creator>
      <dc:date>2005-08-13T07:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603213#M68738</link>
      <description>Given that HTTP_REFERER is just part of the GET or POST request headers, are you sure the first CGI is passing it on?</description>
      <pubDate>Sat, 13 Aug 2005 18:30:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603213#M68738</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-08-13T18:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603214#M68739</link>
      <description>Hi Stuart,&lt;BR /&gt;&lt;BR /&gt;IMHO, the HTTP_REFERER is not part of the request headers, but is an environment variable (since it is retrieved by Perl's $ENV{'HTTP_REFERER'}).&lt;BR /&gt;&lt;BR /&gt;What I cannot understand is why in the first script, the environment contains a valid HTTP_REFERER - &lt;BR /&gt;while during the execution of the called (second) script, HTTP_REFERER suddenly becomes undefined ?!&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Ron.</description>
      <pubDate>Sun, 14 Aug 2005 08:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603214#M68739</guid>
      <dc:creator>Ron Barak</dc:creator>
      <dc:date>2005-08-14T08:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603215#M68740</link>
      <description>an environment variable?  Then it's extremely specific to the way your scripts are written.  Time to learn perl.&lt;BR /&gt;&lt;BR /&gt;Are you doing mod_perl stuff or just CGI's written in perl?</description>
      <pubDate>Mon, 15 Aug 2005 03:07:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603215#M68740</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-08-15T03:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603216#M68741</link>
      <description>Hello Stuart,&lt;BR /&gt;&lt;BR /&gt;A quote from &lt;A href="http://www.perlfect.com/articles/cgi_env.shtml" target="_blank"&gt;http://www.perlfect.com/articles/cgi_env.shtml&lt;/A&gt;&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;CGI Environmental Variables&lt;BR /&gt;One of the methods that the web server uses to pass information to a cgi script is through environmental variables. These are created and assigned appropriate values within the environment that the server spawns for the cgi script. They can be accessed as any other environmental variable, like with getenv() (in C) or %ENV{'VARIABLE_NAME'} (in Perl). Many of them, contain important information, that most cgi programs need to take into account. &lt;BR /&gt;&lt;BR /&gt;This list, highlights some of the most commonly used ones, along with a brief description and notes on possible uses for them. This list is by no means a complete reference; many servers pass their own extra variables, or having different names for some, so better check with your server's documentation. The purpose of this list is only to suggest some common good uses for some of the server-passed information. &lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;HTTP_REFERER&lt;BR /&gt;The URL that the referred (via a link or redirection) the web client to the script. Typed URLs and bookmarks usually result in this variable being left blank. &lt;BR /&gt;In many cases a script may need to behave differently depending on the referer. For example, you may want to restrict your counter script to operate only if it is called from one of your own pages, to prevent someone from using it from another web page without your permission. Or even, the referer may be the actual data that the script needs to process. Extending the example above you might also like to install your counter to many pages, and have the script figure out from the referer which page generated the call and increment the appropriate count, keeping a separate count for each individual URL. A snippet for the referer blocking example could be: &lt;BR /&gt;&lt;BR /&gt;die unless($ENV{HTTP_REFERER}=~m/http:\/\/(www\.)?$mydomain\//);&lt;BR /&gt;------------------------------------------&lt;BR /&gt;So, it may be I need to go back and learn Perl, but others share my faulty Perl knowledge ;-)&lt;BR /&gt;&lt;BR /&gt;Ron.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Aug 2005 13:11:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603216#M68741</guid>
      <dc:creator>Ron Barak</dc:creator>
      <dc:date>2005-08-15T13:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603217#M68742</link>
      <description>Ur huh, that's fine, but it doesn't say *WHERE* the referer comes from.&lt;BR /&gt;&lt;BR /&gt;When in a GET or POST request, a conversation can look similar to this:&lt;BR /&gt;&lt;BR /&gt;GET &lt;A href="http://domain.com/path/to/file.html" target="_blank"&gt;http://domain.com/path/to/file.html&lt;/A&gt; HTTP/1.0&lt;BR /&gt;Host: domain.com&lt;BR /&gt;Referer: &lt;A href="http://domain.com/paht/from.html" target="_blank"&gt;http://domain.com/paht/from.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The 'Referer:' header there is what gets thrown into HTTP_REFERER on the server side.&lt;BR /&gt;&lt;BR /&gt;What this means is that if you have one script calling another script, the first script has to supply the referer it's self.  It won't just 'magically' get there.</description>
      <pubDate>Wed, 17 Aug 2005 06:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603217#M68742</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-08-17T06:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603218#M68743</link>
      <description>Ron, what exactly do you mean with "a CGI script that calls another CGI script"?&lt;BR /&gt;&lt;BR /&gt;I think this can mean several things, and we are not necessarily all thinking about the same variety.&lt;BR /&gt;&lt;BR /&gt;In the first CGI script, you can give the client something (a redirect, or some tag in the content) that makes the client request the second CGI script. In this case, the client may have special rules about when the referrer information is sent and when it is not. &lt;BR /&gt;For example, the client may choose not to send the referrer information for privacy reasons if the second script is requested from a different domain than the first one.&lt;BR /&gt;&lt;BR /&gt;Or you can make the first script call the second script on the server side, giving it suitably-formed input and parsing the output, then integrating it into its own output.&lt;BR /&gt;&lt;BR /&gt;There might be other ways.&lt;BR /&gt;&lt;BR /&gt;So, exactly how are you implemented the calling of the second script?</description>
      <pubDate>Wed, 17 Aug 2005 06:38:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603218#M68743</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2005-08-17T06:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP_REFERER gets undefined</title>
      <link>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603219#M68744</link>
      <description>Hi Matti,&lt;BR /&gt;I decided to get the information I needed from a source other that HTTP_REFERER, as it seems to be unreliable for my purposes.&lt;BR /&gt;Thanks in anycase, and points are due.&lt;BR /&gt;Bye,&lt;BR /&gt;Ron.</description>
      <pubDate>Wed, 17 Aug 2005 11:20:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/http-referer-gets-undefined/m-p/3603219#M68744</guid>
      <dc:creator>Ron Barak</dc:creator>
      <dc:date>2005-08-17T11:20:31Z</dc:date>
    </item>
  </channel>
</rss>

