[Jifty-commit] r537 - in jifty/trunk: lib/Jifty lib/Jifty/Script lib/Jifty/Web

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Feb 1 17:57:07 EST 2006


Author: alexmv
Date: Wed Feb  1 17:57:05 2006
New Revision: 537

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Script/FastCGI.pm
   jifty/trunk/lib/Jifty/Server.pm
   jifty/trunk/lib/Jifty/Web/PageRegion.pm

Log:
 r8872 at zoq-fot-pik:  chmrr | 2006-02-01 17:56:24 -0500
  * Fixes to make Jifty work under FastCGI again


Modified: jifty/trunk/lib/Jifty/Script/FastCGI.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/FastCGI.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/FastCGI.pm	Wed Feb  1 17:57:05 2006
@@ -56,6 +56,13 @@
  
 sub run {
     Jifty->new();
+
+    use Hook::LexWrap;
+    wrap 'HTML::Mason::FakeApache::send_http_header', pre => sub {
+        my $r = shift;
+        $r->header_out( @{$_} ) for Jifty->web->response->headers;
+    };
+
     while ( my $cgi = CGI::Fast->new ) {
         # the whole point of fastcgi requires the env to get reset here..
         # So we must squash it again

Modified: jifty/trunk/lib/Jifty/Server.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Server.pm	(original)
+++ jifty/trunk/lib/Jifty/Server.pm	Wed Feb  1 17:57:05 2006
@@ -47,9 +47,9 @@
     use Hook::LexWrap;
     wrap 'HTML::Mason::FakeApache::send_http_header', pre => sub {
         my $r = shift;
-        $r->header_out( @{$_} ) for Jifty->web->response->headers;
         my $status = $r->header_out('Status') || '200 Jifty OK';
         print STDOUT "HTTP/1.0 $status\n";
+        $r->header_out( @{$_} ) for Jifty->web->response->headers;
     };
 
     return ($self);

Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm	Wed Feb  1 17:57:05 2006
@@ -240,6 +240,8 @@
     # Merge in defaults
     %arguments = (%{ Jifty->web->request->arguments }, region => $self, 'J:ACTIONS' => '', %arguments);
 
+    ### XXX TODO this should create a new Jifty::Request and go
+    ### through the dispatcher
     Jifty->handler->mason->interp->make_request(comp => $self->path,
                                                 args => [ %arguments ],
                                                 out_method => \$result,


More information about the Jifty-commit mailing list