RE: mod_perl does not see multipart POSTs

2002-03-20 Thread Vuillemot, Ward W

I tried the code.  Still nothing.  I did turn On PerlWarn in httpd.conf.
Upon restart I saw the following:

errorlog
[Wed Mar 20 07:55:19 2002] [info] master_main: Restart event signaled. Doing
a graceful restart.
defined(@array) is deprecated at C:/Perl/site/lib/Apache/DBI.pm line 135.
(Maybe you should just omit the defined()?)
[Wed Mar 20 07:55:21 2002] [info] Parent: Created child process 2936
[Wed Mar 20 07:55:21 2002] [info] Parent: Duplicating socket 244 and sending
it to child process 2936
[Wed Mar 20 07:55:22 2002] [info] BytesRead = 372 WSAProtocolInfo = 2006620
[Wed Mar 20 07:55:26 2002] nul: Use of uninitialized value in subroutine
entry at C:/Perl/site/lib/Apache.pm line 61.
/errorlog

I am not sure where the Apache::DBI error crept in, but I believe it is
unrelated.  As for line 61 of Apache, I do not know if this is a warning I
can ignore or not.
Also, as for not using parse() -- it was my understanding it was not
necessary to call explicitly, however you could use the status to provide
some error catching. . .

Is there a bare-bones httpd.conf file I can use to run mod_perl?  I am
presuming it is my configuration of Apache that might be causing problems.

I have the latest mod_perl, apache modules, and apache that I am aware of.

completely befuddled now.  :|

Thanks,
Ward

   :  -Original Message-
   :  From: Randy Kobes [mailto:[EMAIL PROTECTED]]
   :  Sent: Tuesday, March 19, 2002 9:24 PM
   :  To: Vuillemot, Ward W
   :  Cc: 'Issac Goldstand'; [EMAIL PROTECTED]
   :  Subject: Re: mod_perl does not see multipart POSTs
   :  
   :  
   :  
   :  - Original Message -
   :  From: Vuillemot, Ward W [EMAIL PROTECTED]
   :  To: 'Issac Goldstand' [EMAIL PROTECTED]; 
   :  [EMAIL PROTECTED]
   :  Sent: Tuesday, March 19, 2002 2:30 PM
   :  Subject: RE: mod_perl does not see multipart POSTs
   :  
   :  
   :   I simplified everything to the bare bones.  Nothing is 
   :  getting passed.  I
   :  am
   :   at a complete loss.  If anyone has a few minutes, just 
   :  try running this.
   :   You should be able to point it toward a text/plain file 
   :  and have it
   :   displayed below the file upload form.
   :  
   :  I'm not quite sure what the full requirements are, but 
   :  the following
   :  works for me in displaying the contents of the uploaded 
   :  file - this
   :  is on Win32 with the latest mod_perl/libapreq packages.
   :  
   :  In httpd.conf:
   :  **
   :  PerlModule Apache::testUpload
   :  Location /testUpload
   :SetHandler perl-script
   :PerlHandler Apache::testUpload
   :PerlSendHeader Off
   :  /Location
   :  **
   :  and Apache/testUpload.pm is
   :  
   :  package Apache::testUpload;
   :  use strict;
   :  ##
   :  ### START LOADING MODULES  ###
   :  ##
   :  use Apache::Request ();
   :  use CGI;
   :  use Apache::Constants qw(:common);
   :  ##
   :  ### HANDLER###
   :  ##
   :  sub handler{
   :my $q = Apache::Request-new(shift, DISABLE_UPLOADS = 0,
   :POST_MAX = 2048);
   :return main($q);
   :  }
   :  
   :  ##
   :  ###  START OF MAIN LOGIC   ###
   :  ##
   :  sub main{
   :my $q = shift;
   :my $status = $q-parse();
   :return $status unless $status == OK;
   :my %results = ();
   :my $cgi = CGI-new();
   :#
   :## START FORM  ##
   :#
   :$results{content} .= $cgi-start_multipart_form;
   :$results{content} .= $cgi-filefield(-name='uploaded_file',
   : -default='starting value',
   : -size=50,
   : -maxlength=80);
   :$results{content} .= $cgi-submit();
   :$results{content} .= $cgi-endform;
   :#
   :##  START UPLOAD FILE  ##
   :#
   :my $upload = $q-upload || undef;
   :if ($upload) {
   :  my $fh = $upload-fh;
   :  my $filename = $upload-filename;
   :  my $size = $upload-size;
   :  $results{content} .= Upload Filebr /;
   :  $results{content} .= Filename: $filenamebr /;
   :  $results{content} .= Size: $sizebr /;
   :  $results{content} .= $_br / while $fh;
   :}
   :#
   :## START OUTPUT##
   :#
   :# send results to browser
   :$q-send_http_header('text/html');
   :print $cgi-start_html('File Upload Test');
   :print $cgi-h1('Content') . $results{content};
   :print $cgi-end_html();
   :return OK;
   :  }
   :  1;
   :  **
   :  
   :  Apart from abbreviating the output

RE: mod_perl does not see multipart POSTs

2002-03-20 Thread Randy Kobes

On Wed, 20 Mar 2002, Vuillemot, Ward W wrote:

 I tried the code.  Still nothing.  I did turn On PerlWarn in httpd.conf.
 Upon restart I saw the following:

 errorlog
 [Wed Mar 20 07:55:19 2002] [info] master_main: Restart event signaled. Doing
 a graceful restart.
 defined(array) is deprecated at C:/Perl/site/lib/Apache/DBI.pm line 135.
   (Maybe you should just omit the defined()?)
 [Wed Mar 20 07:55:21 2002] [info] Parent: Created child process 2936
 [Wed Mar 20 07:55:21 2002] [info] Parent: Duplicating socket 244 and sending
 it to child process 2936
 [Wed Mar 20 07:55:22 2002] [info] BytesRead = 372 WSAProtocolInfo = 2006620
 [Wed Mar 20 07:55:26 2002] nul: Use of uninitialized value in subroutine
 entry at C:/Perl/site/lib/Apache.pm line 61.
 /errorlog

 I am not sure where the Apache::DBI error crept in, but I believe it is
 unrelated.  As for line 61 of Apache, I do not know if this is a warning I
 can ignore or not.
 Also, as for not using parse() -- it was my understanding it was not
 necessary to call explicitly, however you could use the status to provide
 some error catching. . .

 Is there a bare-bones httpd.conf file I can use to run mod_perl?  I am
 presuming it is my configuration of Apache that might be causing problems.

 I have the latest mod_perl, apache modules, and apache that I am aware of.

 completely befuddled now.  :|

 Thanks,
 Ward

That is strange ... Does a simple mod_perl handler that, eg, just
says hello work? What about a simple form that uses
Apache::Request to process? You might also verify that you are
running the latest version of mod_perl and, especially, libapreq.
Are you running on Win32? We have the latest libapreq ppm package
for this under http://theoryx5.uwinnipeg.ca/ppmpackages/ - maybe
try this if you weren't using it before.

The configuration I used for the Apache/testUpload.pm file I sent
was just, in the appropriate places,

LoadModule perl_module modules/mod_perl.so

and, after ClearModuleList (you may not have this),

AddModule mod_perl.c

as well as the specific ones for testUpload:

PerlModule Apache::testUpload
Location /testUpload
  SetHandler perl-script
  PerlHandler Apache::testUpload
  PerlSendHeader Off
/Location

best regards,
randy kobes




RE: mod_perl does not see multipart POSTs -- SOLVED

2002-03-20 Thread Vuillemot, Ward W

Using the POST2GET snippet was interferring.  I thought I had turned it off
when trying Lergon's suggestion.  I must not have.
As for the actual code. . .I copied it exactly as Lergon's and it works.  I
know what was different, but I swear that what I had was taken verbatim from
mod_perl documentation.

Just for academic purposes.

I had something like

sub handler{
use Apache::Constants qw(:common);
my $r = Apache-request(shift);
main($r);
return OK;
}
sub main{
my $r = shift;
my $q = Apache::Request-new(shift, DISABLE_UPLOADS = 0, POST_MAX
= 204800);
blah blah blah
}   

Per Lergon's code I just simplified it to
sub handler{
use Apache::Constants qw(:common);
my $q = Apache::Request-new(shift, DISABLE_UPLOADS = 0, POST_MAX
= 204800);
main($q);
return OK;
}
sub main{
my $q = shift;
blah blah blah
}   
To boot, I was using the POST2GET module found at
http://perl.apache.org/guide/snippets.html#Reusing_Data_from_POST_request
Once I got rid of POST2GET and simplified the script ala Lergon's code
things started to work.  Sigh.

However, I followed code snippets from
http://perl.apache.org/guide/porting.html#Converting_into_Perl_Content_Han
I guess I either did not read things carefully, or I am missing something.
:(  I would imagine I had about 3 solutions going at once -- that is to say
that if any one of them were implemented alone things might have worked.  In
conjunction with each other they fumbled each other up.

Oh well.

I do appreciate everyone's time.  Hopefully the above information might
prove useful to other people in similar situation.

Cheers,
Ward


   :  -Original Message-
   :  From: Ernest Lergon [mailto:[EMAIL PROTECTED]]
   :  Sent: Tuesday, March 19, 2002 1:30 PM
   :  To: [EMAIL PROTECTED]
   :  Subject: Re: mod_perl does not see multipart POSTs
   :  
   :  
   :  Vuillemot, Ward W wrote:
   :   
   :   Here is the Apache config
   :   PerlModule testUpload
   :   Location /testUpload
   : SetHandler perl-script
   : PerlHandler testUpload
   : PerlSendHeader Off
   : # limit POSTS so that they get processed properly
   : Limit POST
   :   PerlInitHandler POST2GET
   : /Limit
   :   /Location
   :   
   :  
   :  Hi Ward,
   :  
   :  assumed, you have seen the example from
   :  
   :  http://perl.apache.org/guide/snippets.html#Reusing_Data_fr
   :  om_POST_request
   :  
   :  and you have written your own POST2GET.pm, more questions 
   :  are arising:
   :  
   :  Is POST2GET.pm loaded anywhere - in a startup.pl or via 
   :  httpd.conf?
   :  
   :  Some more hints:
   :  
   :  Add 'use warnings;' to your code and look at your error_log.
   :  CGI.pm should be loaded AND compiled very early.
   :  Be careful with global vars under mod_perl.
   :  Look in CPAN to avoid reinventing the wheel:
   :  http://search.cpan.org/search?mode=modulequery=upload
   :  
   :  Ernest
   :  
   :  
   :  
   :  -- 
   :  
   :  **
   :  ***
   :  * VIRTUALITAS Inc.   *
   :*
   :  **
   :*
   :  * European Consultant Office *  
http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*



Re: mod_perl does not see multipart POSTs -- SOLVED

2002-03-20 Thread Ernest Lergon

Vuillemot, Ward W wrote:
 
 Using the POST2GET snippet was interferring.  I thought I had turned it off
 when trying Lergon's suggestion.  I must not have.
 As for the actual code. . .I copied it exactly as Lergon's and it works.  I
 know what was different...

 [snip]

Hi Ward, hi Randy!

Thank you for the flowers, Ward, but it I don't want to adorn myself
with borrowed plumes ;-))

So the hint was mine and the code was Randy's!

Ernest




-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




RE: mod_perl does not see multipart POSTs -- SOLVED

2002-03-20 Thread Vuillemot, Ward W

Randy,

My apologies!  Thank you for the code.  


Ernest, 

Thanks for the clues!  You take your namesake seriously, too.  Wonderful! ;)


Cheers,
Ward



Re: mod_perl does not see multipart POSTs -- SOLVED

2002-03-20 Thread Stas Bekman

Vuillemot, Ward W wrote:
 Using the POST2GET snippet was interferring.  I thought I had turned it off
 when trying Lergon's suggestion.  I must not have.
 As for the actual code. . .I copied it exactly as Lergon's and it works.  I
 know what was different, but I swear that what I had was taken verbatim from
 mod_perl documentation.
 
 Just for academic purposes.

Ward, Ernest, can you please send the me the required changes if any so 
I can update the guide. I wasn't following this discussion, so if you 
can send a patch that would be very helpful. Thanks.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




RE: mod_perl does not see multipart POSTs

2002-03-19 Thread Vuillemot, Ward W

I simplified everything to the bare bones.  Nothing is getting passed.  I am
at a complete loss.  If anyone has a few minutes, just try running this.
You should be able to point it toward a text/plain file and have it
displayed below the file upload form.

No matter what I do, all I am seeing for content_type is:
CONTENT_TYPE: multipart/form-data;
boundary=---7d2fb231407ee

ie, nothing.

Here is the Apache config
PerlModule testUpload
Location /testUpload
  SetHandler perl-script
  PerlHandler testUpload
  PerlSendHeader Off
  # limit POSTS so that they get processed properly
  Limit POST
PerlInitHandler POST2GET
  /Limit
/Location

Here is the code:
package testUpload;
use strict; 

our %results;
our %messages;

##
### START LOADING MODULES  ###
##
use Apache::Request ();

##
### HANDLER###
##
sub handler{
use Apache;
use Apache::Constants qw(:common);

my $r = shift;
Apache-request($r);

main($r);
  
return OK;
}

##
###  START OF MAIN LOGIC   ###
##
sub main{
my $r = shift;
my $q = Apache::Request-new($r, DISABLE_UPLOADS = 0, POST_MAX =
2048);

my $cgi = CGI-new();
#
## START FORM  ##
#
$results{content} .= $cgi-start_multipart_form;
$results{content} .= $cgi-filefield(-name='uploaded_file',
-default='starting value',
-size=50,
-maxlength=80);
$results{content} .= $cgi-submit();
$results{content} .= $cgi-endform;

#
##  START UPLOAD FILE  ##
#
my $upload = $q-upload || undef;
my $fh = ( defined($upload) ? $upload-fh : undef );
$results{content} .= Upload Filebr /;
if (defined( $fh )) {
while ($fh) {
$results{content} .= $_;
}
}

#
## START DEBUG ##
#
foreach my $var (sort keys %ENV) {
push(@{$messages{debug}},(  $var: $ENV{$var} ))  if
($var =~ /content/i);
}
foreach my $var ($q-param) {
push(@{$messages{debug}},(  $var: .$q-param($var) ))
if $var;
}

#
##START MESSAGES   ##
#
# generate messages and/or errors if any
foreach my $type (keys %messages) {
my $status = join($cgi-p,@{$messages{$type}}) if
$messages{$type};
$results{contenterrata} .= $status if $status;
}

#
## START OUTPUT##
#
# send results to browser
$r-send_http_header('text/html');
print $cgi-start_html('File Upload Test'); 
print $cgi-h1('Content') . $results{content};
print $cgi-h1('Errata') . $results{contenterrata};
print $cgi-end_html();

# clean up for mod_perl
%results = ();
%messages = ();
}

1;


   :  -Original Message-
   :  From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
   :  Sent: Monday, March 18, 2002 9:37 AM
   :  To: Vuillemot, Ward W
   :  Cc: [EMAIL PROTECTED]
   :  Subject: Re: mod_perl does not see multipart POSTs
   :  
   :  
   :  I'm not sure I understand what you're asking...  Apache, 
   :  on it's own, 
   :  does not support any internal parsing of POST data, multipart or 
   :  otherwise, so why should mod_perl?  For this, we have the 
   :  Apache::Request library in mod_perl (Which is the 
   :  mod_perl interface to 
   :  the libapreq library for Apache's C API).  libapreq supports 
   :  multipart/form-data, even without a file upload...
   :  
   :   Issac
   :  
   :  Vuillemot, Ward W wrote:
   :  
   :  All,
   :  
   :  I am still trying to figure out why my setup of mod_perl 
   :  does not have
   :  multipart POSTs.  I rebooted my machine, and found that, 
   :  whereas I reported
   :  before mod_perl would try to reload the page (which it 
   :  should not but send
   :  out a text/plain attachment for download), it appears 
   :  the script (running as
   :  a perl handler) does not see any of the multipart POST.  
   :  Vanilla posts are
   :  not a problem, though.  Even if the information being 
   :  sent via multipart is
   :  _not_ a file to upload to the server, the information is 
   :  lost in transit.
   :  
   :  Here is what is odd.  
   :  
   :  The same scripts/modules unmodified and running as 
   :  perl_cgi are okay.
   :  Multipart forms allow me to upload files, et

Re: mod_perl does not see multipart POSTs

2002-03-19 Thread Ernest Lergon

Vuillemot, Ward W wrote:
 
 Here is the Apache config
 PerlModule testUpload
 Location /testUpload
   SetHandler perl-script
   PerlHandler testUpload
   PerlSendHeader Off
   # limit POSTS so that they get processed properly
   Limit POST
 PerlInitHandler POST2GET
   /Limit
 /Location
 

Hi Ward,

assumed, you have seen the example from

http://perl.apache.org/guide/snippets.html#Reusing_Data_from_POST_request

and you have written your own POST2GET.pm, more questions are arising:

Is POST2GET.pm loaded anywhere - in a startup.pl or via httpd.conf?

Some more hints:

Add 'use warnings;' to your code and look at your error_log.
CGI.pm should be loaded AND compiled very early.
Be careful with global vars under mod_perl.
Look in CPAN to avoid reinventing the wheel:
http://search.cpan.org/search?mode=modulequery=upload

Ernest



-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*




Re: mod_perl does not see multipart POSTs

2002-03-19 Thread Randy Kobes


- Original Message -
From: Vuillemot, Ward W [EMAIL PROTECTED]
To: 'Issac Goldstand' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 2:30 PM
Subject: RE: mod_perl does not see multipart POSTs


 I simplified everything to the bare bones.  Nothing is getting passed.  I
am
 at a complete loss.  If anyone has a few minutes, just try running this.
 You should be able to point it toward a text/plain file and have it
 displayed below the file upload form.

I'm not quite sure what the full requirements are, but the following
works for me in displaying the contents of the uploaded file - this
is on Win32 with the latest mod_perl/libapreq packages.

In httpd.conf:
**
PerlModule Apache::testUpload
Location /testUpload
  SetHandler perl-script
  PerlHandler Apache::testUpload
  PerlSendHeader Off
/Location
**
and Apache/testUpload.pm is

package Apache::testUpload;
use strict;
##
### START LOADING MODULES  ###
##
use Apache::Request ();
use CGI;
use Apache::Constants qw(:common);
##
### HANDLER###
##
sub handler{
  my $q = Apache::Request-new(shift, DISABLE_UPLOADS = 0,
  POST_MAX = 2048);
  return main($q);
}

##
###  START OF MAIN LOGIC   ###
##
sub main{
  my $q = shift;
  my $status = $q-parse();
  return $status unless $status == OK;
  my %results = ();
  my $cgi = CGI-new();
  #
  ## START FORM  ##
  #
  $results{content} .= $cgi-start_multipart_form;
  $results{content} .= $cgi-filefield(-name='uploaded_file',
   -default='starting value',
   -size=50,
   -maxlength=80);
  $results{content} .= $cgi-submit();
  $results{content} .= $cgi-endform;
  #
  ##  START UPLOAD FILE  ##
  #
  my $upload = $q-upload || undef;
  if ($upload) {
my $fh = $upload-fh;
my $filename = $upload-filename;
my $size = $upload-size;
$results{content} .= Upload Filebr /;
$results{content} .= Filename: $filenamebr /;
$results{content} .= Size: $sizebr /;
$results{content} .= $_br / while $fh;
  }
  #
  ## START OUTPUT##
  #
  # send results to browser
  $q-send_http_header('text/html');
  print $cgi-start_html('File Upload Test');
  print $cgi-h1('Content') . $results{content};
  print $cgi-end_html();
  return OK;
}
1;
**

Apart from abbreviating the output, one difference between the
above and your original is the $q-parse() call within main().

best regards,
randy kobes





Re: mod_perl does not see multipart POSTs

2002-03-18 Thread Issac Goldstand

I'm not sure I understand what you're asking...  Apache, on it's own, 
does not support any internal parsing of POST data, multipart or 
otherwise, so why should mod_perl?  For this, we have the 
Apache::Request library in mod_perl (Which is the mod_perl interface to 
the libapreq library for Apache's C API).  libapreq supports 
multipart/form-data, even without a file upload...

 Issac

Vuillemot, Ward W wrote:

All,

I am still trying to figure out why my setup of mod_perl does not have
multipart POSTs.  I rebooted my machine, and found that, whereas I reported
before mod_perl would try to reload the page (which it should not but send
out a text/plain attachment for download), it appears the script (running as
a perl handler) does not see any of the multipart POST.  Vanilla posts are
not a problem, though.  Even if the information being sent via multipart is
_not_ a file to upload to the server, the information is lost in transit.

Here is what is odd.  

The same scripts/modules unmodified and running as perl_cgi are okay.
Multipart forms allow me to upload files, et cetera.  In short, I am
confident the problem is not with my programming.

I am using the code snippet, POST2GET, to capture the one-time read of POST
and storing as if it was retrieved via GET.

Any ideas how to debug this?

I REALLY REALLY would love some feedback.  I would love to think that all my
effort to stay away from M$ ASP are worth it -- esp. when I stand up to
defend Perl, Apache, and mod_perl in an environment that is decidely
M$-bent.

Thanks!
Ward







RE: mod_perl does not see multipart POSTs

2002-03-18 Thread Vuillemot, Ward W

Just to re-iterate a previous post.  Here is what I have done thusfar.

My httpd.conf file:
#
# **
# ** MOD PERL CHANGES **
# **
# limit POSTS so that they get processed properly
Limit POST
  PerlInitHandler POST2GET
/Limit
# force reloading of modules on restart
PerlFreshRestart on
# Perl module primitive mother load on start/restart
#PerlRequire lib/perl/startup.pl
# FLOE application (mod_perl)
PerlModule Apache::DBI
PerlModule floeApp
Location /floeApp
  SetHandler perl-script
  PerlHandler floeApp
  PerlSendHeader On
/Location

And the relevant two snippets of code from the script are:
## process incoming
# if submitted
my %hash = undef;
my $initialList = $q-param('initialList') || '';
my $upload = $q-upload || undef;
my $fh = $upload-fh if defined($upload);
if (defined($upload)  $upload) {
$initialList = '';
while ($fh) {
$initialList .= $_;
}
}

## some processing is done to the POST'ed data
## and eventually. . .

## send file to client
print   Content-type: text/plain\n;
print   Content-Disposition: attachment;
filename=list.txt\n\n;

foreach my $value (sort keys %$hash) {
chomp($value);
next unless ($value);
print $hash-{$value}$CRLF$value$CRLF;
}

exit;

$q is the Apache::Request object.  When running in CGI mode it is simply
pointing toward the CGI.pm object.

I did not mean to presume Apache was doing anything to anything.
Apache::Request does not seem to appear to support/handle multipart in my
present config.  I do not know why.  All I have changed in my code is to use
Apache::Request instead of CGI.   Otherwise, the scripts are untouched.
Same machine, same httpd.conf other the mod_perl changes, same scripts. . .
.then why cannot I not see anything being passed via multipart/form-data
encoding?

   :  -Original Message-
   :  From: Issac Goldstand [mailto:[EMAIL PROTECTED]]
   :  Sent: Monday, March 18, 2002 9:37 AM
   :  To: Vuillemot, Ward W
   :  Cc: [EMAIL PROTECTED]
   :  Subject: Re: mod_perl does not see multipart POSTs
   :  
   :  
   :  I'm not sure I understand what you're asking...  Apache, 
   :  on it's own, 
   :  does not support any internal parsing of POST data, multipart or 
   :  otherwise, so why should mod_perl?  For this, we have the 
   :  Apache::Request library in mod_perl (Which is the 
   :  mod_perl interface to 
   :  the libapreq library for Apache's C API).  libapreq supports 
   :  multipart/form-data, even without a file upload...
   :  
   :   Issac
   :  
   :  Vuillemot, Ward W wrote:
   :  
   :  All,
   :  
   :  I am still trying to figure out why my setup of mod_perl 
   :  does not have
   :  multipart POSTs.  I rebooted my machine, and found that, 
   :  whereas I reported
   :  before mod_perl would try to reload the page (which it 
   :  should not but send
   :  out a text/plain attachment for download), it appears 
   :  the script (running as
   :  a perl handler) does not see any of the multipart POST.  
   :  Vanilla posts are
   :  not a problem, though.  Even if the information being 
   :  sent via multipart is
   :  _not_ a file to upload to the server, the information is 
   :  lost in transit.
   :  
   :  Here is what is odd.  
   :  
   :  The same scripts/modules unmodified and running as 
   :  perl_cgi are okay.
   :  Multipart forms allow me to upload files, et cetera.  In 
   :  short, I am
   :  confident the problem is not with my programming.
   :  
   :  I am using the code snippet, POST2GET, to capture the 
   :  one-time read of POST
   :  and storing as if it was retrieved via GET.
   :  
   :  Any ideas how to debug this?
   :  
   :  I REALLY REALLY would love some feedback.  I would love 
   :  to think that all my
   :  effort to stay away from M$ ASP are worth it -- esp. 
   :  when I stand up to
   :  defend Perl, Apache, and mod_perl in an environment that 
   :  is decidely
   :  M$-bent.
   :  
   :  Thanks!
   :  Ward
   :  
   :  
   :  
   :