summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-08-12 13:05:45 +0200
committerYorhel <git@yorhel.nl>2011-08-12 13:05:45 +0200
commita943deb4b8054f6c440bdfdf993dc834308c4521 (patch)
treec35157ec4c634802c1ae9c340282f5d8d842f9d8
parent1c1cee3e12524d32e48f2e72ecced53b6cdc8048 (diff)
Work around a new in-place-decoding "feature" of Encode.pmv0.2
As explained in http://www.nntp.perl.org/group/perl.unicode/2004/12/msg2758.html
-rw-r--r--lib/TUWF/Request.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/TUWF/Request.pm b/lib/TUWF/Request.pm
index 74b1ae2..8caee9b 100644
--- a/lib/TUWF/Request.pm
+++ b/lib/TUWF/Request.pm
@@ -61,7 +61,8 @@ sub reqInit {
sub _parse_urlencoded {
my %dat;
- for (split /[;&]/, decode_utf8 shift, 1) {
+ my $d = shift;
+ for (split /[;&]/, decode_utf8 $d, 1) {
my($key, $val) = split /=/, $_, 2;
next if !defined $key or !defined $val;
for ($key, $val) {
@@ -269,7 +270,8 @@ sub reqBaseURI {
sub reqURI {
my $s = shift;
- return $s->reqBaseURI().'/'.$s->reqPath().decode_utf8($ENV{QUERY_STRING} ? '?'.$ENV{QUERY_STRING} : '', 1);
+ my $u = $ENV{QUERY_STRING} ? '?'.$ENV{QUERY_STRING} : '';
+ return $s->reqBaseURI().'/'.$s->reqPath().decode_utf8($u, 1);
}