Bug 15089: Make buglist.cgi shorten search URLs by cleaning them and then redirecting with the cleaned URL.

Patch By Mikhail Gusarov <dottedmag@altlinux.org> r=mkanat, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@254177 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2008-09-11 22:09:21 +00:00
parent 49c1730296
commit 0f5903d079
2 changed files with 12 additions and 1 deletions

View File

@ -66,6 +66,17 @@ if (length($buffer) == 0) {
ThrowUserError("buglist_parameters_required");
}
#
# If query was POSTed, clean the URL from empty parameters and redirect back to
# itself. This will make advanced search URLs more tolerable.
#
if ($cgi->request_method() eq 'POST') {
$cgi->clean_search_url();
print $cgi->redirect(-url => $cgi->self_url());
exit;
}
# Determine whether this is a quicksearch query.
my $searchstring = $cgi->param('quicksearch');
if (defined($searchstring)) {

View File

@ -64,7 +64,7 @@ var queryform = "queryform"
// -->
</script>
<form method="get" action="buglist.cgi" name="queryform">
<form method="post" action="buglist.cgi" name="queryform">
[% PROCESS search/form.html.tmpl %]