Changeset 13805
- Timestamp:
- 06/13/08 13:54:04 (5 years ago)
- Location:
- lang/perl/HTTP-Engine/branches/lazy_request
- Files:
-
- 2 modified
-
Makefile.PL (modified) (1 diff)
-
lib/HTTP/Engine/Interface/POE.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-Engine/branches/lazy_request/Makefile.PL
r13792 r13805 74 74 Apache::TestMM::filter_args(); 75 75 Apache::TestMM::generate_script('t/TEST'); 76 tests('t/*.t t/modperl/basic.t'); 76 tests('t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t t/modperl/basic.t'); 77 } else { 78 tests('t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t'); 77 79 } 78 80 -
lang/perl/HTTP-Engine/branches/lazy_request/lib/HTTP/Engine/Interface/POE.pm
r13792 r13805 35 35 ClientFilter => 'POE::Filter::HTTPD', 36 36 ( $self->alias ? ( Alias => $self->alias ) : () ), 37 ClientInput => sub { 38 my ( $kernel, $heap, $request ) = @_[ KERNEL, HEAP, ARG0 ]; 37 ClientInput => _client_input($self), 38 ); 39 } 39 40 40 # Filter::HTTPD sometimes generates HTTP::Response objects. 41 # They indicate (and contain the response for) errors that occur 42 # while parsing the client's HTTP request. It's easiest to send 43 # the responses as they are and finish up. 44 if ( $request->isa('HTTP::Response') ) { 45 $heap->{client}->put($request); 46 $kernel->yield('shutdown'); 47 return; 48 } 41 sub _client_input { 42 my $self = shift; 49 43 50 # follow is normal workflow. 51 my $ascgi = HTTP::Request::AsCGI->new($request)->setup; 52 do { 53 $self->handle_request(); 54 }; 55 $ascgi->restore; 44 sub { 45 my ( $kernel, $heap, $request ) = @_[ KERNEL, HEAP, ARG0 ]; 56 46 57 $heap->{client}->put($ascgi->response); 47 # Filter::HTTPD sometimes generates HTTP::Response objects. 48 # They indicate (and contain the response for) errors that occur 49 # while parsing the client's HTTP request. It's easiest to send 50 # the responses as they are and finish up. 51 if ( $request->isa('HTTP::Response') ) { 52 $heap->{client}->put($request); 58 53 $kernel->yield('shutdown'); 59 }, 60 ); 54 return; 55 } 56 57 # follow is normal workflow. 58 my $ascgi = HTTP::Request::AsCGI->new($request)->setup; 59 do { 60 $self->handle_request(); 61 }; 62 $ascgi->restore; 63 64 $heap->{client}->put($ascgi->response); 65 $kernel->yield('shutdown'); 66 } 61 67 } 62 68
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)