Changeset 819 for trunk/lib/Perlbal/Plugin
- Timestamp:
- 05/28/09 16:25:36 (10 months ago)
- Files:
-
- 1 modified
-
trunk/lib/Perlbal/Plugin/Redirect.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Perlbal/Plugin/Redirect.pm
r817 r819 1 2 1 package Perlbal::Plugin::Redirect; 3 4 use Perlbal;5 2 use strict; 6 3 use warnings; … … 24 21 my $res_header = Perlbal::HTTPHeaders->new_response(301); 25 22 $res_header->header('Location' => "http://$target_host$path"); 23 $res_header->header('Content-Length' => 0); 24 # really should only do the keep-alive for 1.1, but that's a bigger issue 25 $res_header->header('Connection' => 'keep-alive'); 26 26 $pb->write($res_header->to_string_ref()); 27 28 # FIXME: Should probably generate a more interesting body here.29 my $body = "...";30 $pb->write(\$body);31 27 32 28 return 1;
