1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Ralph Mitchell fixed: input field with NAME= and VALUE= weren't processed

properly case insensitive
This commit is contained in:
Daniel Stenberg 2004-10-19 18:36:17 +00:00
parent 38b1d96750
commit 225a652021

View File

@ -26,10 +26,10 @@ sub namevalue {
my ($tag)=@_; my ($tag)=@_;
my $name=$tag; my $name=$tag;
if($name =~ /name *=/i) { if($name =~ /name *=/i) {
if($name =~ /name *= *([^\"\']([^ \">]*))/) { if($name =~ /name *= *([^\"\']([^ \">]*))/i) {
$name = $1; $name = $1;
} }
elsif($name =~ /name *= *(\"|\')([^\"\']*)(\"|\')/) { elsif($name =~ /name *= *(\"|\')([^\"\']*)(\"|\')/i) {
$name=$2; $name=$2;
} }
else { else {
@ -45,10 +45,10 @@ sub namevalue {
# get value tag # get value tag
my $value= $tag; my $value= $tag;
if($value =~ /[^\.a-zA-Z0-9]value *=/i) { if($value =~ /[^\.a-zA-Z0-9]value *=/i) {
if($value =~ /[^\.a-zA-Z0-9]value *= *([^\"\']([^ \">]*))/) { if($value =~ /[^\.a-zA-Z0-9]value *= *([^\"\']([^ \">]*))/i) {
$value = $1; $value = $1;
} }
elsif($value =~ /[^\.a-zA-Z0-9]value *= *(\"|\')([^\"\']*)(\"|\')/) { elsif($value =~ /[^\.a-zA-Z0-9]value *= *(\"|\')([^\"\']*)(\"|\')/i) {
$value=$2; $value=$2;
} }
else { else {