Changeset 23070

Show
Ignore:
Timestamp:
09.10.2010 23:08:52 (9 years ago)
Author:
davidb
Message:

Post code originally written to allow for debugging from the command-line by piping in required input. However, this has caused problems elsewhere, from time to time. Decision made to remove this debug option, as there are others ways to debug CGI scripts (such as printing to STDERR and looking in web log file) that do not cause these complications. At this stage old code has been commented out. At some stage in the future it will be removed entirely.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/cgi-bin/gsdlCGI.pm

    r21804 r23070  
    1616    my $class = shift @_; 
    1717     
    18     my $self; 
     18#    my $self; 
    1919    
    2020    # We'll determine the correct config file in this constructor itself  
     
    2929    } 
    3030 
    31     if ((defined $ENV{'REQUEST_METHOD'}) && ($ENV{'REQUEST_METHOD'} eq "POST")) { 
    32  
    33     # Check if we're dealing with the upload-coll-file cmd. Because it will be a  
    34     # multipart POST message and must be dealt with by the default CGI() constructor 
    35     if((defined $ENV{'QUERY_STRING'}) && ($ENV{'QUERY_STRING'} =~ m/upload-collection-file/)) { 
    36         $self = new CGI();  
    37     }  
    38  
    39     else { # all other POST commands processed using CGI($line) 
    40         my $line = <STDIN>; 
    41         if ((defined $line) && ($line ne "")) {  
    42         $self = new CGI($line); 
    43         } 
    44     } 
    45      
    46     }     
     31#    if ((defined $ENV{'REQUEST_METHOD'}) && ($ENV{'REQUEST_METHOD'} eq "POST")) { 
     32# 
     33#   # Check if we're dealing with the upload-coll-file cmd. Because it will be a  
     34#   # multipart POST message and must be dealt with by the default CGI() constructor 
     35#   if((defined $ENV{'QUERY_STRING'}) && ($ENV{'QUERY_STRING'} =~ m/upload-collection-file/)) { 
     36#       $self = new CGI();  
     37#   }  
     38# 
     39#   else { # all other POST commands processed using CGI($line) 
     40#       my $line = <STDIN>; 
     41#       if ((defined $line) && ($line ne "")) {  
     42#       $self = new CGI($line); 
     43#       } 
     44#   } 
     45#    
     46#    }     
    4747     
    4848    # If one of the conditions above did not hold, then self=new CGI()  
    49     if (!defined $self) {  
    50     $self = new CGI(); 
    51     } 
     49#    if (!defined $self) {  
     50#   $self = new CGI(); 
     51#    } 
     52 
     53    my $self = new CGI(@_); 
    5254 
    5355    if ($version == 2) {