Redirect with no referer...

Discussion in 'Perl Misc' started by Erik Rull, Oct 17, 2004.

  1. Erik Rull

    Erik Rull Guest

    Hi,

    I wrote a webmailer and want to "derefer" links that are clicked within
    mails, so that no session or any other param are in the referer-field of
    the target server.

    I had this attempt:

    #!/usr/bin/perl

    print "Refresh:1;URL=http://www.server.to/click.on\n\n";

    But the referer is only killed in some browsers, some versions of the
    MSIE still take the referer with.
    Bug or feature? ;-)

    Any other ideas?

    Greets,

    Erik
     
    Erik Rull, Oct 17, 2004
    #1
    1. Advertising

  2. Erik Rull <> wrote:

    > I wrote a webmailer and want to "derefer" links that are clicked within
    > mails, so that no session or any other param are in the referer-field of
    > the target server.
    >
    > I had this attempt:
    >
    > #!/usr/bin/perl
    >
    > print "Refresh:1;URL=http://www.server.to/click.on\n\n";



    If you are having trouble with Perl's print() function then
    you have a Perl question.

    Are you having trouble with Perl's print() function?


    > But the referer is only killed in some browsers, some versions of the
    > MSIE still take the referer with.
    > Bug or feature? ;-)
    >
    > Any other ideas?



    Ask Perl questions in a Perl newsgroup.

    Ask web questions (like yours) in a web newsgroup.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Oct 17, 2004
    #2
    1. Advertising

  3. Erik Rull () wrote:
    : Hi,

    : I wrote a webmailer and want to "derefer" links that are clicked within
    : mails, so that no session or any other param are in the referer-field of
    : the target server.

    : I had this attempt:

    : #!/usr/bin/perl

    : print "Refresh:1;URL=http://www.server.to/click.on\n\n";

    : But the referer is only killed in some browsers, some versions of the
    : MSIE still take the referer with.
    : Bug or feature? ;-)

    : Any other ideas?

    You can't control the refer header cause it's sent by the browser.

    Instead you could use LWP:Simple to act as a proxy. You send exactly the
    headers you want the remote site to see.

    Then your script receives the results and sends them back to the browser.

    Hopefully the html from the remote site has embedded links that point back
    to their own site so that the browser sends subsequent requests to that
    site, and not back to your script. I guess you could parse the html
    before you send it back to ensure there is a base statement to the remote
    site to help make relative links work.
     
    Malcolm Dew-Jones, Oct 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dave wanta

    Re: How to Spoof Referer URL

    dave wanta, Jul 6, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,054
    Admin
    Jul 7, 2003
  2. =?Utf-8?B?TWlsYW4gTmVnb3Zhbg==?=

    How do I clear the "Referer" header?

    =?Utf-8?B?TWlsYW4gTmVnb3Zhbg==?=, Aug 18, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    785
    clintonG
    Aug 19, 2004
  3. Kevin Spencer

    No referer page for SWF files

    Kevin Spencer, Oct 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    566
    Raed Sawalha
    Oct 28, 2004
  4. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    HTTP_ REFERER is empty for popup window

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Nov 3, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,466
    Joerg Jooss
    Nov 3, 2004
  5. Sal
    Replies:
    1
    Views:
    1,044
Loading...

Share This Page