diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-02-27 14:54:13 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-02-27 14:54:13 +0100 |
commit | 50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc (patch) | |
tree | 5dbaa90d673b2c6de97c4cdb869e5047f54472d5 /Bugzilla | |
parent | c650592f1cdb27e5605d70a80ae03e9a2afb879b (diff) | |
download | bugzilla-50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc.tar.gz bugzilla-50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc.tar.xz |
Bug 730670: Do not redirect in buglist.cgi to improve performance
r=glob a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/CGI.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 9f50aba32..98fa3d79b 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -189,7 +189,10 @@ sub clean_search_url { # list_id is added in buglist.cgi after calling clean_search_url, # and doesn't need to be saved in saved searches. - $self->delete('list_id'); + $self->delete('list_id'); + + # no_redirect is used internally by redirect_search_url(). + $self->delete('no_redirect'); # And now finally, if query_format is our only parameter, that # really means we have no parameters, so we should delete query_format. @@ -445,6 +448,7 @@ sub redirect_search_url { return; } + my $no_redirect = $self->param('no_redirect'); $self->clean_search_url(); # Make sure we still have params still after cleaning otherwise we @@ -458,6 +462,10 @@ sub redirect_search_url { $self->param('list_id', $recent_search->id); } + # Browsers which support history.replaceState do not need to be + # redirected. We can fix the URL on the fly. + return if $no_redirect; + # GET requests that lacked a list_id are always redirected. POST requests # are only redirected if they're under the CGI_URI_LIMIT though. my $uri_length = length($self->self_url()); |