Changeset 23196 for main/trunk/greenstone2
- Timestamp:
- 2010-10-21T17:56:01+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/cgi-bin/gsdlCGI.pm
r23188 r23196 45 45 my $class = shift @_; 46 46 47 #my $self;47 my $self; 48 48 49 49 # We'll determine the correct config file in this constructor itself … … 58 58 } 59 59 60 # if ((defined $ENV{'REQUEST_METHOD'}) && ($ENV{'REQUEST_METHOD'} eq "POST")) { 61 # 62 # # Check if we're dealing with the upload-coll-file cmd. Because it will be a 63 # # multipart POST message and must be dealt with by the default CGI() constructor 64 # if((defined $ENV{'QUERY_STRING'}) && ($ENV{'QUERY_STRING'} =~ m/upload-collection-file/)) { 65 # $self = new CGI(); 66 # } 67 # 68 # else { # all other POST commands processed using CGI($line) 69 # my $line = <STDIN>; 70 # if ((defined $line) && ($line ne "")) { 71 # $self = new CGI($line); 72 # } 73 # } 74 # 75 # } 76 77 # If one of the conditions above did not hold, then self=new CGI() 78 # if (!defined $self) { 79 # $self = new CGI(); 80 # } 81 82 my $self = new CGI(@_); 60 # POST that is URL-encoded (like a GET) is a line that needs to be read from STDIN 61 if ((defined $ENV{'CONTENT_TYPE'}) && ($ENV{'CONTENT_TYPE'} =~ m/form-urlencoded/)) { 62 my $line = <STDIN>; 63 if ((defined $line) && ($line ne "")) { 64 $self = new CGI($line); 65 } 66 } 67 68 # If the conditions above did not hold, then self=new CGI(@_) 69 if (!defined $self) { 70 # It's a GET, or else a POST with Multi-part body 71 $self = new CGI(@_); 72 } 73 83 74 84 75 if ($version == 2) {
Note:
See TracChangeset
for help on using the changeset viewer.