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