[Bio] / FigKernelPackages / ServerThing.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/ServerThing.pm

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

revision 1.24, Thu Dec 10 15:13:51 2009 UTC revision 1.25, Thu Dec 10 15:34:10 2009 UTC
# Line 30  Line 30 
30  sub RunServer {  sub RunServer {
31      # Get the parameters.      # Get the parameters.
32      my ($serverName, $key) = @_;      my ($serverName, $key) = @_;
33        # Set up tracing. We never do CGI tracing here; the only question is whether
34        # or not the caller passed in a tracing key. If he didn't, we use the server
35        # name.
36        ETracing($key || $serverName);
37      # Turn off YAML compression, which causes problems with some of our hash keys.      # Turn off YAML compression, which causes problems with some of our hash keys.
38      $YAML::CompressSeries = 0;      $YAML::CompressSeries = 0;
39      # Create the server object.      # Create the server object.
# Line 53  Line 57 
57              if (! defined $key) {              if (! defined $key) {
58                  # No tracing key, so presume we're a web service. Check for Fast CGI.                  # No tracing key, so presume we're a web service. Check for Fast CGI.
59                  if ($ENV{REQUEST_METHOD} eq '') {                  if ($ENV{REQUEST_METHOD} eq '') {
                     # Here we're doing Fast CGI. In this case, the tracing key is the  
                     # server name.  
                     ETracing($serverName);  
60                      # Count the number of requests.                      # Count the number of requests.
61                      my $requests = 0;                      my $requests = 0;
62                      Trace("Starting Fast CGI loop.") if T(3);                      Trace("Starting Fast CGI loop.") if T(3);
# Line 73  Line 74 
74                      my $cgi = CGI->new();                      my $cgi = CGI->new();
75                      # Check for a source parameter. This gets used as the tracing key.                      # Check for a source parameter. This gets used as the tracing key.
76                      $key = $cgi->param('source');                      $key = $cgi->param('source');
                     if (! $key) {  
                         # No source parameter, so do normal setup. Note we turn off  
                         # CGI parameter tracing.  
                         ETracing($cgi, 'noParms');  
                     } else {  
                         # Set up tracing using the specified key.  
                         ETracing($key);  
                     }  
77                      # Run this request.                      # Run this request.
78                      RunRequest($cgi, $serverThing);                      RunRequest($cgi, $serverThing);
79                  }                  }
# Line 89  Line 82 
82                  # key to find the parm file and create the CGI object from that.                  # key to find the parm file and create the CGI object from that.
83                  my $ih = Open(undef, "<$FIG_Config::temp/$key.parms");                  my $ih = Open(undef, "<$FIG_Config::temp/$key.parms");
84                  $cgi = CGI->new($ih);                  $cgi = CGI->new($ih);
                 # Set up tracing using the specified key.  
                 ETracing($key);  
85                  # Run this request.                  # Run this request.
86                  RunRequest($cgi, $serverThing);                  RunRequest($cgi, $serverThing);
87              }              }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3