Title: RE: AuthenNTLM, IE, KeepAlives, Post?

Ged,

Will this help even when I am not up loading files? 

Here is the test.pl script I am using.

#!/usr/bin/perl
require CGI;
use strict;

my $q = new CGI;
print $q->header;
print <<EODUMP;

<html>
<body>
<form method=post>
        <input type=text name=foo><br>
        <input type=submit value=submit>
</form>
<br>
EODUMP

print $q->param('foo');
print "</body></html>";

this works fine with a get method but a post doesn't.  It runs the first time but the second it repeats the original request.

Thanks

Joe

-----Original Message-----
From: Ged Haywood [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 1:18 PM
To: Harnish, Joe
Cc: '[EMAIL PROTECTED]'
Subject: RE: AuthenNTLM, IE, KeepAlives, Post?


Hi there,

On Tue, 11 Jun 2002, Harnish, Joe wrote:

> Does anyone know of issues with mod_perl and post?

Here's one.

73,
Ged.


From [EMAIL PROTECTED] Tue Jun 11 18:16:11 2002
Date: Wed, 20 Mar 2002 19:20:29 +0000 (GMT)
From: Ged Haywood <[EMAIL PROTECTED]>
To: Stas Bekman <[EMAIL PROTECTED]>
Subject: Re: mod_perl does not see multipart POSTs --> SOLVED

Hi Stas,

On Thu, 21 Mar 2002, Stas Bekman wrote:

> Vuillemot, Ward W wrote:
> > Using the POST2GET snippet was interferring.

I kept trying to tell him that...

> Ward, Ernest, can you please send the me the required changes

If you look in CGI.pm you'll see that the file upload code won't get
called if the request is GET, so POST2GET guarantees that it will fail
for CGI.pm.  Here's a snippet from the modified CGI.pm that I sent to
him and which it seems he never bothered to try out.

----------------------------------------------------------------------
      # Process multipart postings, but only if the initializer is
      # not defined.

# debugging... --GWH--
my $tempEnvContentType = $ENV{'CONTENT_TYPE'};
print STDERR "CGI.pm: \$ENV{'CONTENT_TYPE'}=[$tempEnvContentType]\n";
print STDERR "CGI.pm: \$meth=[$meth]\n";
      if ($meth eq 'POST'
          && defined($ENV{'CONTENT_TYPE'})
          && $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data|
          && !defined($initializer)
          ) {
          my($boundary) = $ENV{'CONTENT_TYPE'} =~ /boundary=\"?([^\";,]+)\"?/;
          $self->read_multipart($boundary,$content_length);
          last METHOD;
      }
----------------------------------------------------------------------

73,
Ged.

Reply via email to