[Rt-commit] r3704 - in HTTP-Server-Simple-Mason: . lib/HTTP/Server/Simple

glasser at bestpractical.com glasser at bestpractical.com
Mon Aug 22 14:01:41 EDT 2005


Author: glasser
Date: Mon Aug 22 14:01:40 2005
New Revision: 3704

Modified:
   HTTP-Server-Simple-Mason/Changes
   HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm
Log:
Revert 1.30 workarounds

Modified: HTTP-Server-Simple-Mason/Changes
==============================================================================
--- HTTP-Server-Simple-Mason/Changes	(original)
+++ HTTP-Server-Simple-Mason/Changes	Mon Aug 22 14:01:40 2005
@@ -1,8 +1,13 @@
+* Revert most of the 0.07 and 0.08 changes, which were attempts to work around
+  serious bugs in Mason 1.30 that have been fixed in Mason 1.31.
+
 * Create handler_class and setup_escapes hooks in new_handler, so that
   subclasses don't need to copy-and-paste new_handler
  
 * Default content type should be "text/html", not "text/htm"
 
+* Test suite should die on errors
+
 0.08 Thu Aug 18 13:49:47 EDT 2005
 
 * Internal updates for more robustness on 1.30

Modified: HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm
==============================================================================
--- HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm	(original)
+++ HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm	Mon Aug 22 14:01:40 2005
@@ -1,7 +1,7 @@
 package HTTP::Server::Simple::Mason;
 use base qw/HTTP::Server::Simple::CGI/;
 use strict;
-our $VERSION = '0.08';
+our $VERSION = '0.09';
 
 =head1 NAME
 
@@ -39,18 +39,9 @@
 use Hook::LexWrap;
 
 wrap 'HTML::Mason::FakeApache::send_http_header', pre => sub {
-    # If we've already sent the HTTP header, don't try to again.
-    if (not HTML::Mason::Request->instance or
-            HTML::Mason::Request->instance->{'_hssm_http_header_sent'}) {
-        $_[-1] = "1";
-        return;
-    }
-
     my $r = shift;
-
     my $status = $r->header_out('Status') || '200 H::S::Mason OK';
     print STDOUT "HTTP/1.0 $status\n";
-    HTML::Mason::Request->instance->{'_hssm_http_header_sent'} = 1;
 };
 
 =head2 mason_handler 
@@ -142,7 +133,7 @@
             # Send headers if they have not been sent by us or by user.
             # We use instance here because if we store $request we get a
             # circular reference and a big memory leak.
-                unless ($m->{'_hssm_http_header_sent'}) {
+                unless ($r->http_header_sent) {
                        $r->send_http_header();
                 }
             {


More information about the Rt-commit mailing list