We have a problem with our info request script - it ignores everything after a space. IE. if a user enters 'My Name' in a field, only 'My' will be returned.
Here's the function that grabs the data, where I think the issue is:
Code:
sub decode_vars
{
$i=0;
if ( $ENV{'REQUEST_METHOD'} eq "GET") {
$temp=$ENV{'QUERY_STRING'};
}
else {
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
}
@pairs=split(/&/,$temp);
foreach $item(@pairs) {
($key,$content)=split(/=/,$item,2);
$content=~tr/+/ /;
$content=~s/%(..)/pack("c",hex($1))/ge;
$content =~ s/\r\n/\n/g;
$fields{$key}=$content;
}
}
If you need more let me know!
- Mina
EDIT:
Come to think of it I don't think the problem is there. It seems to be happening only once in a while. I'll keep an eye on it...
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
Last edited by Minaki; 04-07-2005 at 11:36 AM..
|