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

[MacPerl-AnyPerl] Malformed headers...



Pardon me if this is too far off-topic (which I don't think so, but figure
I'll be humble up front ;-)...but you all are a bright bunch and it's been
a while since I've called on your expertise...

I have a linux box and I'm working also with flash.  I have discovered a
way for Flash to submit to a perl/cgi script.  I am running a small test on
this.  The submission works fine and the script runs.  I am supposed to
return the data (my little Flash book says) as Content-type:
application/x-www-urlformencoded (And flash will let you read from a simple
ol' text file with data in the format var=value&this=that)...So....

1) The Flash piece submits two numbers as variables and the script will
multiply them and hand them back to the *.swf file
2) The script processes (I've verified it) but...
3) Apache is telling me that there are bad headers or rather a 'malformed
header'.

I've tried editing mime.types (added application/x-www-urlformencoded as a
type) in my apache conf file and I've searched a bit around the web, but to
no avail. Any help appreciated. Below are the error and the script itself.  

Thanks in advance,

Jason

HERE's the error (straight out of the apache log)
--------------------
[Sat Dec  4 18:26:03 1999] [error] [client 129.123.91.95] malformed header
from
script. Bad header=answer=20: /web/cgi-bin/flash.pl
--------------------

And here's the script...
----------------------
#!/usr/bin/perl

use CGI q(:standard);

print "Content-type: applications/x-www-urlformencoded\n";

my $first = param('number1');
my $second = param('number2');

my $answer = ($first * $second);


print "answer\=$answer";
------------------------


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org