/[Frey]/trunk/lib/Frey/Server.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 /trunk/lib/Frey/Server.pm

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

revision 346 by dpavlin, Sat Nov 15 16:29:26 2008 UTC revision 387 by dpavlin, Mon Nov 17 22:57:51 2008 UTC
# Line 96  sub main { Line 96  sub main {
96                          $path =~ m{/editor(.+?)\+(\d+)}                          $path =~ m{/editor(.+?)\+(\d+)}
97                  ) {                  ) {
98                          my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';                          my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
99                          my $cmd = "$editor -R +$2 $1";                          # FIXME SECURITY path verification for $1
100                            my $cmd = "$editor +$2 $1";
101                          warn "# $path -> system $cmd";                          warn "# $path -> system $cmd";
102                          $req->print( $cmd );                          $req->print( $cmd );
103                          system( $cmd );                          system( $cmd );
# Line 106  sub main { Line 107  sub main {
107                  ) {                  ) {
108                          my $class = rest2class $1;                          my $class = rest2class $1;
109                          warn "# run $class $2\n";                          warn "# run $class $2\n";
110                          $f = Frey::Run->new( class => $class, params => \%params );                          $f = Frey::Run->new( class => $class, params => \%params, run => $2 );
111                  } elsif (                  } elsif (
112                          $path =~ m{/([^/]+)/?$}                          $path =~ m{/([^/]+)/?$}
113                  ) {                  ) {
# Line 130  sub main { Line 131  sub main {
131          if ( $@ ) {          if ( $@ ) {
132                  warn $@;                  warn $@;
133                  $req->conn->send_error( 404 );  # FIXME this should probably be 500, but we can't ship page with it                  $req->conn->send_error( 404 );  # FIXME this should probably be 500, but we can't ship page with it
134                  $req->print( qq{<pre class="error">$@<pre>} );                  $req->print( qq{<pre class="frey-error">$@<pre>} );
135  #               Carp::REPL::repl;  #               Carp::REPL::repl;
136    
137          }          }

Legend:
Removed from v.346  
changed lines
  Added in v.387

  ViewVC Help
Powered by ViewVC 1.1.26