diff options
author | mkanat%bugzilla.org <> | 2008-09-12 03:09:19 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-09-12 03:09:19 +0000 |
commit | 8e770628c3c39ada722c0a71348f854f29e34a6c (patch) | |
tree | e70f4ebf5789f309542bf1afc8f71ad83dcce1a8 | |
parent | 0e194f1266c1189ceb63a8c61660bddf8c48731e (diff) | |
download | bugs-8e770628c3c39ada722c0a71348f854f29e34a6c.tar bugs-8e770628c3c39ada722c0a71348f854f29e34a6c.tar.gz bugs-8e770628c3c39ada722c0a71348f854f29e34a6c.tar.bz2 bugs-8e770628c3c39ada722c0a71348f854f29e34a6c.tar.xz bugs-8e770628c3c39ada722c0a71348f854f29e34a6c.zip |
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
-rwxr-xr-x | buglist.cgi | 11 | ||||
-rw-r--r-- | template/en/default/search/search-advanced.html.tmpl | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi index 6619fdd65..687146ed6 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -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)) { diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index 1f1fd50ab..cb0519a81 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -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 %] |