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:
parent
2caad1018b
commit
edbf96658e
@ -1 +1 @@
|
||||
9076
|
||||
9077
|
||||
@ -1 +1 @@
|
||||
2f10cf7b02a921d4e85bd3514035bccef06f3fc7
|
||||
515a56de63c46fa3717ec853282d700dadd0c47d
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user