Bug 1032323: canonicalise_query() should omit parameters with empty values so generated URLs are shorter

r=glob,a=sgreen


git-svn-id: svn://10.0.0.236/trunk@265453 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-07-10 06:45:46 +00:00
parent 2caad1018b
commit edbf96658e
3 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
9076
9077

View File

@ -1 +1 @@
2f10cf7b02a921d4e85bd3514035bccef06f3fc7
515a56de63c46fa3717ec853282d700dadd0c47d

View File

@ -124,7 +124,8 @@ sub canonicalise_query {
my $esc_key = url_quote($key);
foreach my $value ($self->param($key)) {
if (defined($value)) {
# Omit params with an empty value
if (defined($value) && $value ne '') {
my $esc_value = url_quote($value);
push(@parameters, "$esc_key=$esc_value");
@ -659,7 +660,9 @@ I<Bugzilla::CGI> also includes additional functions.
=item C<canonicalise_query(@exclude)>
This returns a sorted string of the parameters, suitable for use in a url.
This returns a sorted string of the parameters whose values are non-empty,
suitable for use in a url.
Values in C<@exclude> are not included in the result.
=item C<send_cookie>