FreeBSD Bugzilla – Attachment 32492 Details for
Bug 53676
[patch] Don't make people contact doc@ for 404 from non FreeBSD sites
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
www-cgi-missing-referer.patch
www-cgi-missing-referer.patch (text/plain), 1.80 KB, created by
simon
on 2003-06-24 13:50:04 UTC
(
hide
)
Description:
www-cgi-missing-referer.patch
Filename:
MIME Type:
Creator:
simon
Created:
2003-06-24 13:50:04 UTC
Size:
1.80 KB
patch
obsolete
>Index: missing_handler.cgi >=================================================================== >RCS file: /home/ncvs/www/en/cgi/missing_handler.cgi,v >retrieving revision 1.14 >diff -u -d -r1.14 missing_handler.cgi >--- missing_handler.cgi 18 May 2003 17:45:20 -0000 1.14 >+++ missing_handler.cgi 24 Jun 2003 12:26:27 -0000 >@@ -75,6 +75,7 @@ > > # rfc1738 says that ";"|"/"|"?"|":"|"@"|"&"|"=" may be reserved. > $http_referer_url = escape2($ENV{'HTTP_REFERER'}); >+$freebsd_referer = $http_referer_url =~ m%^http://[^/]*FreeBSD\.org%i; > $http_referer_url =~ s/([^a-zA-Z0-9;\/?:&=])/sprintf("%%%02x",ord($1))/eg; > $redirect_url_save = escape2($ENV{'REDIRECT_URL'}); > $redirect_url_save =~ s/([^a-zA-Z0-9;\/?:&=])/sprintf("%%%02x",ord($1))/eg; >@@ -98,14 +99,22 @@ > <p>\n}; > } > >+if($freebsd_referer) { >+ $contact = qq[ >+Please contact the members of the >+FreeBSD Documentation Project <<A HREF="mailto:freebsd-doc\@FreeBSD.ORG?subject=Document%20not%20found%20-%20http://$http_host$redirect_url_save&body=$http_referer_url">freebsd-doc\@FreeBSD.ORG</A>> >+or the server administrator >+<a href="mailto:$server_admin?subject=Document%20not%20found%20-%20http://$http_host$redirect_url_save&body=$http_referer_url">$server_admin</a>. >+]; >+} else { >+ $contact = ""; >+} > print qq[ > The closest match to your request is > <a href="http://$server_name">http://$server_name</a>. > >-Please contact the members of the >-FreeBSD Documentation Project <<A HREF="mailto:freebsd-doc\@FreeBSD.ORG?subject=Document%20not%20found%20-%20http://$http_host$redirect_url_save&body=$http_referer_url">freebsd-doc\@FreeBSD.ORG</A>> >-or the server administrator >-<a href="mailto:$server_admin?subject=Document%20not%20found%20-%20http://$http_host$redirect_url_save&body=$http_referer_url">$server_admin</a>.<p> >+$contact >+<p> > > <center> > Please try our
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53676
: 32492