mhonarc-users

Re: Marc and HTTP_REFERER

2000-10-25 04:03:19
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 24 Oct 2000, Laurent Rathle wrote:

Le Tue, Oct 24, 2000 at 08:58:47PM +0200 , Erik Rossen a écrit : 

HTTP_REFERER is a variable set by the web client that contains the URL of
the last page visited (the referring page). I had the same problem because
I was using Junkbuster to hide this information.  Instead of giving up
Junkbuster, I found that there was only one place in marc-search where
HTTP_REFERER was being used and it wasn't really necessary that the value
be supplied by the client.  Do you know Perl?  It's an easy fix as I
remember.


Unfortunately, no. I've tried to comment this passage, but the only result 
I've
got is a blank page.

There is a little bit more to it than that.  You have to set a reasonable
value for HTTP_REFERER inside marc-search.  This code snippet should
explain what I did.  (I'm sorry that it is not in diff -u form, but I
don't have the original source and I am too lazy to go looking for it.)

- ---------------------------------------------------------------------
    use Marc::Form;
    my $query = new Marc::Form;          # Create search object

# ERIK: 2000-04-23 commented out the following two lines and set H_R
# to a default so that I could continue to use Junkbuster with no
# problems.
#    $query->error("Sorry, your client needs to set HTTP_REFERER") 
#      unless defined $ENV{'HTTP_REFERER'};
$ENV{'HTTP_REFERER'}='http://www.linux-gull.ch/mail/maillist.html'
      unless defined $ENV{'HTTP_REFERER'};

    $query->doc_root($doc_root);
- ---------------------------------------------------------------------

By the way, most mail archive sites I come across have given up on
marc-search and are using htdig instead.  We've found that marc-search is
a bit of a pig on resources and un-usable on under-powered machines (Sparc
2s).

Erik Rossen                         ^
rossen(_at_)freesurf(_dot_)ch                 /e\
http://www.multimania.com/rossen   ---   GPG key ID: 2935D0B9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: Made with pgp4pine 1.75

iD8DBQE59paBY88aPik10LkRAirVAKCXQe+zuwS+eLkhOZjXVhMNGZYcTQCg0e2R
xi0YlPRcHsoK0ystHosgZqc=
=C0zT
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>