[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5112] branches/1.3/LedgerSMB/Form.pm



Revision: 5112
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5112&view=rev
Author:   einhverfr
Date:     2012-08-17 10:21:54 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
Correcting faulty POST handling under some environments, other than Apache/CGI, where both query string and content length are set

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Form.pm

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2012-08-17 10:19:36 UTC (rev 5111)
+++ branches/1.3/LedgerSMB/Form.pm	2012-08-17 10:21:54 UTC (rev 5112)
@@ -104,19 +104,17 @@
         die "Error: Request entity too large\n";
     }
 
-    read( STDIN, $_, $ENV{CONTENT_LENGTH} ) unless $ENV{CONTENT_LENGTH} == 0;
-
-    if ($argstr) {
+    if ($ENV{CONTENT_LENGTH}!= 0){
+        read( STDIN, $_, $ENV{CONTENT_LENGTH} );
+    }elsif ($argstr) {
         $_ = $argstr;
     }
     elsif ( $ENV{QUERY_STRING} ) {
         $_ = $ENV{QUERY_STRING};
     }
-
     elsif ( $ARGV[0] ) {
         $_ = $ARGV[0];
     }
-
     my $self = {};
     my $orig = {};
     %$orig = split /[&=]/ unless !defined $_;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.