/[pxelator]/lib/PXElator/httpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/httpd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 115 by dpavlin, Sun Aug 2 12:09:02 2009 UTC revision 118 by dpavlin, Mon Aug 3 08:52:32 2009 UTC
# Line 17  use Carp qw/confess/; Line 17  use Carp qw/confess/;
17  use File::Slurp;  use File::Slurp;
18  #use JSON;  #use JSON;
19  use IO::Socket::INET;  use IO::Socket::INET;
 use Module::Refresh;  
20    
21  our $pids;  our $pids;
22  $pids = { httpd => $$ } unless defined $pids; # keep pids on refresh  $pids = { httpd => $$ } unless defined $pids; # keep pids on refresh
# Line 257  sub start { Line 256  sub start {
256          start_stop 'screen';          start_stop 'screen';
257          start_stop 'kvm';          start_stop 'kvm';
258    
259          while (my $client = $server->accept()) {          while (1) {
260                  $client->autoflush(1);                  my $client = $server->accept() || next; # ALARM trickle us
261                  my $request = <$client>;                  my $request = <$client>;
262    
263                  warn "request $request\n" if $debug;                  warn "request $request\n" if $debug;
264    
                 Module::Refresh->refresh;  
   
265                  if ($request =~ m{^GET (/.*) HTTP/1.[01]}) {                  if ($request =~ m{^GET (/.*) HTTP/1.[01]}) {
266                          my $path = $1;                          my $path = $1;
267                          my $param;                          my $param;

Legend:
Removed from v.115  
changed lines
  Added in v.118

  ViewVC Help
Powered by ViewVC 1.1.26