patch: allow semicolin (;) delimited key/value pairs

patch: allow semicolin (;) delimited key/value pairs

am 05.07.2005 01:08:01 von trwww

--0-1204505637-1120518481=:89618
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

The following patch needs applied to the URI/_query.pm file, because currently it dosent honor a specification about allowed delimiters for key/value pairs:

--- _query.pm 2005-07-04 18:39:17.000000000 -0400
+++ _query_semi.pm 2005-07-04 18:40:03.000000000 -0400
@@ -55,7 +55,7 @@
return if !defined($old) || !length($old) || !defined(wantarray);
return unless $old =~ /=/; # not a form
map { s/\+/ /g; uri_unescape($_) }
- map { /=/ ? split(/=/, $_, 2) : ($_ => '')} split(/&/, $old);
+ map { /=/ ? split(/=/, $_, 2) : ($_ => '')} split(/[&;]/, $old);
}
# Handle ...?dog+bones type of query

Heres the spec:

http://www.w3.org/TR/html4/appendix/notes.html#ampersands-in -uris

Todd W.


--0-1204505637-1120518481=:89618--