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

--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
[at] [at] -55,7 +55,7 [at] [at]
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--
trwww [ Di, 05 Juli 2005 01:08 ] [ ID #867333 ]
Perl » perl.libwww » patch: allow semicolin (;) delimited key/value pairs

Vorheriges Thema: Simultaneous requests handling by LWP
Nächstes Thema: Re: "Please inform the author" - error during installation process