Apache::Registry, mod_perl interface, and post data

2001-02-16 Thread Andrew Ho

Hello,

I'm writing an Apache::Registry and I can't seem to retrieve POST
information. I usually write handlers rather than Apache::Registry
scripts, so this is a mystery to me. From a sample form:

form method="post" action="post.pl"
 input type="hidden" name="hello" value="world"
/form

To this simple Apache::Registry script:

#!/usr/local/bin/perl
my $r = Apache-request;
print "Content-type: text/plain\n\n";
print "Post = ( ", join(", ", $r-content), " )\n";

Gives me nothing. My second thought was that Apache::Registry was eating
the POST information to feed it to the script via STDIN (for compatibility
with conventional CGI), so I tried this:

#!/usr/local/bin/perl
use CGI ();
my $cgi = new CGI;
print "Content-type: text/plain\n\n";
print "CGI = ( ",
join(", ", map { ($_, $cgi-param($_)) } $cgi-param), " )\n";

The POSTed information has still gone away! Am I on crack?! This should be
the simplest script ever! Just to check, I ran the above script as a CGI
as the target of the same HTML form and it worked fine.

I'm using Perl 5.6.0, mod_perl 1.24_01, and Apache 1.3.14 on Solaris x86,
CGI.pm 2.56. The client I use doesn't seem to make a difference.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--




Re: Apache::Registry, mod_perl interface, and post data

2001-02-16 Thread Jeff Beard

On Fri, 16 Feb 2001, Andrew Ho wrote:


 form method="post" action="post.pl"
  input type="hidden" name="hello" value="world"
 /form

I added a button and push it. It works. ;)

--Jeff

--
Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape dot com
Earth:  Boulder, CO, USA




Re: Apache::Registry, mod_perl interface, and post data

2001-02-16 Thread Andrew Ho

Hello,

JBI added a button and push it. It works. ;)

Urgh, I had a button on my actual test page; it just magically disappeared
when I retyped it in the e-mail.

FWIW, after debugging it a bit further, I am getting a Content-length of
the appropriate size, too. The Content-type is also correct for a POST; I
sniffed the packets and the request is correct. Just no input. Nothing on
STDIN, either. I'm frankly mystified, wondering if I'm just totally
missing something obvious.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--




Re: Apache::Registry, mod_perl interface, and post data

2001-02-16 Thread Jeff Beard

On Fri, 16 Feb 2001, Andrew Ho wrote:

 Hello,

 JBI added a button and push it. It works. ;)

 Urgh, I had a button on my actual test page; it just magically disappeared
 when I retyped it in the e-mail.


I don't think the problem is with what you posted. I tried your snippets on
two different systems and they worked as expects. What's your config look like?
Do you get the 'Post = ()' output from the Registry script? Are you running any
other software that might interfere?

--Jeff

--
Jeff Beard
___
Web:www.cyberxape.com
Email:  jeff at cyberxape dot com
Earth:  Boulder, CO, USA




Re: Apache::Registry, mod_perl interface, and post data

2001-02-16 Thread Andrew Ho

Hello,

JBI don't think the problem is with what you posted. I tried your snippets
JBon two different systems and they worked as expects. What's your config
JBlook like? Do you get the 'Post = ()' output from the Registry script?
JBAre you running any other software that might interfere?

Thanks for forcing me to check my config and discovering that Someone left
.pl's set to a different handler of their own, devious creation in
UserDirs (this is a dev box) instead of Apache::Registry. Doh!
Mystery solved. Thanks for the jolt.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--