Commit 515a56de authored by Ed Morley's avatar Ed Morley Committed by Byron Jones

Bug 1032323: canonicalise_query() should omit parameters with empty values so…

Bug 1032323: canonicalise_query() should omit parameters with empty values so generated URLs are shorter r=glob,a=sgreen
parent 2f10cf7b
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment