diff options
author | Ed Morley <emorley@mozilla.com> | 2014-07-10 14:28:31 +0800 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-07-10 14:28:31 +0800 |
commit | 515a56de63c46fa3717ec853282d700dadd0c47d (patch) | |
tree | 40d7d99f99b0eff0b3e2068721152d9dba9312da /Bugzilla | |
parent | 2f10cf7b02a921d4e85bd3514035bccef06f3fc7 (diff) | |
download | bugs-515a56de63c46fa3717ec853282d700dadd0c47d.tar bugs-515a56de63c46fa3717ec853282d700dadd0c47d.tar.gz bugs-515a56de63c46fa3717ec853282d700dadd0c47d.tar.bz2 bugs-515a56de63c46fa3717ec853282d700dadd0c47d.tar.xz bugs-515a56de63c46fa3717ec853282d700dadd0c47d.zip |
Bug 1032323: canonicalise_query() should omit parameters with empty values so generated URLs are shorter
r=glob,a=sgreen
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/CGI.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 48b4fb0bf..656c462b7 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -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> |