vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r18050: LJSUP-7735: response code on a bots requ...

Committer: vsukhanov
LJSUP-7735: response code on a bots requests has been changed to 412 Precondition Failed.
U   trunk/cgi-bin/Apache/LiveJournal.pm
U   trunk/cgi-bin/LJ/Request/Apache.pm
U   trunk/cgi-bin/LJ/Request/Apache2.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2011-01-19 05:49:00 UTC (rev 18049)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2011-01-19 07:28:51 UTC (rev 18050)
@@ -240,7 +240,7 @@
 
 sub blocked_bot
 {
-    LJ::Request->status_line("403 Denied");
+    LJ::Request->status(LJ::Request::HTTP_PRECONDITION_FAILED);
     LJ::Request->content_type("text/html");
     LJ::Request->send_http_header();
 
@@ -259,7 +259,7 @@
     }
 
     LJ::Request->print("<h1>$subject</h1>$message");
-    return LJ::Request::OK;
+    return LJ::Request::HTTP_PRECONDITION_FAILED;
 }
 
 sub trans

Modified: trunk/cgi-bin/LJ/Request/Apache.pm
===================================================================
--- trunk/cgi-bin/LJ/Request/Apache.pm	2011-01-19 05:49:00 UTC (rev 18049)
+++ trunk/cgi-bin/LJ/Request/Apache.pm	2011-01-19 07:28:51 UTC (rev 18050)
@@ -28,6 +28,7 @@
 sub LJ::Request::BAD_REQUEST               { return Apache::Constants::BAD_REQUEST() }
 sub LJ::Request::HTTP_GONE                 { return Apache::Constants::NOT_FOUND() }
 sub LJ::Request::AUTH_REQUIRED             { return Apache::Constants::AUTH_REQUIRED() }
+sub LJ::Request::HTTP_PRECONDITION_FAILED  { return Apache::Constants::HTTP_PRECONDITION_FAILED() }
 
 my $instance = '';
 

Modified: trunk/cgi-bin/LJ/Request/Apache2.pm
===================================================================
--- trunk/cgi-bin/LJ/Request/Apache2.pm	2011-01-19 05:49:00 UTC (rev 18049)
+++ trunk/cgi-bin/LJ/Request/Apache2.pm	2011-01-19 07:28:51 UTC (rev 18050)
@@ -39,6 +39,7 @@
 sub LJ::Request::BAD_REQUEST               { return Apache2::Const::HTTP_BAD_REQUEST }
 sub LJ::Request::HTTP_GONE                 { return Apache2::Const::HTTP_GONE }
 sub LJ::Request::AUTH_REQUIRED             { return Apache2::Const::AUTH_REQUIRED }
+sub LJ::Request::HTTP_PRECONDITION_FAILED  { return Apache2::Const::HTTP_PRECONDITION_FAILED }
 
 my $instance = '';
 

Tags: livejournal, pm, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments