Franky (franky) wrote in changelog,
Franky
franky
changelog

[livejournal] r19272: Making changes so we can cache IP bans i...

Committer: david
Making changes so we can cache IP bans in Varnish.
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2011-06-09 11:02:36 UTC (rev 19271)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2011-06-09 16:34:08 UTC (rev 19272)
@@ -253,6 +253,7 @@
     my $reason = shift;
     LJ::Request->status(LJ::Request::HTTP_PRECONDITION_FAILED);
     LJ::Request->content_type("text/html");
+    LJ::Request->header_out("X-Ban-Reason" => $reason || 'unknown');
     LJ::Request->send_http_header();
 
     my ($ip, $uniq);
@@ -261,7 +262,7 @@
         $uniq = LJ::UniqCookie->current_uniq;
     }
 
-    my $subject = LJ::Lang::get_text(undef, 'error.banned.bot.subject') || $LJ::BLOCKED_BOT_SUBJECT || "403 Denied";
+    my $subject = LJ::Lang::get_text(undef, 'error.banned.bot.subject') || $LJ::BLOCKED_BOT_SUBJECT || "412 Precondition Failed";
     my $message = LJ::Lang::get_text(undef, 'error.banned.bot.message', undef, { ip => $ip, uniq => $uniq } );
 
     unless ($message) {

Tags: dnewhall, livejournal, pm
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