Open
Bug 774194
Opened 12 years ago
Updated 6 years ago
buglist's "see all search results" link needs to use POST instead of GET if the query string is longer than CGI_URI_LIMIT
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
NEW
People
(Reporter: glob, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
LpSolit
:
review-
dkl
:
review+
|
Details | Diff | Splinter Review |
if a query list results in more bugs than default_search_limit, a link is displayed at the top of the buglist which appends limit=0 to the url.
however if the resulting url is longer than CGI_URI_LIMIT this will result in an error.
we need to use POST, similar to bug 762783.
Attachment #748659 -
Flags: review?(LpSolit)
note - even with this patch, clicking on a column header may result in the CGI_URI_LIMIT being reached. i've filed bug 871547 to track that, as that may require a different solution to simply changing the link to a form.
Comment 3•12 years ago
|
||
Comment on attachment 748659 [details] [diff] [review]
patch v1
Review of attachment 748659 [details] [diff] [review]:
-----------------------------------------------------------------
I was able to shorten a bit by re-using hidden-fields.html.tmpl
+ [% IF url_base.length + no_limit_url.length > constants.CGI_URI_LIMIT %]
+ <form action="buglist.cgi" method="post">
+ <input type="hidden" name="limit" value="0">
+ [% PROCESS "global/hidden-fields.html.tmpl"
+ exclude="^(order|cmdtype|query_based_on|token)$" %]
+ <input type="submit" value="See all search results for this query">
+ </form>
+ [% ELSE %]
+ <a href="[% no_limit_url FILTER none %]&length=[% url_base.length + no_limit_url.length FILTER uri %]">
+ See all search results for this query</a>.
But I am fine either way. It works as expected. r=dkl
Attachment #748659 -
Flags: review+
Comment 4•12 years ago
|
||
(In reply to David Lawrence [:dkl] from comment #3)
> + <a href="[% no_limit_url FILTER none %]&length=[% url_base.length +
> no_limit_url.length FILTER uri %]">
Ignore the &length= part I added for debugging ;)
Flags: approval?
Flags: approval4.4?
Flags: approval4.2?
Comment 5•12 years ago
|
||
How do you reach such a limit? What the link contains is the query to generate the buglist, not the list of bug IDs itself. Either that, or I don't understand what you are talking about.
(In reply to Frédéric Buclin from comment #5)
> How do you reach such a limit? What the link contains is the query to
> generate the buglist, not the list of bug IDs itself. Either that, or I
> don't understand what you are talking about.
see bug 870962 for an example.
Updated•11 years ago
|
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval4.2?
Flags: approval4.2+
Flags: approval+
Comment 7•11 years ago
|
||
Comment on attachment 748659 [details] [diff] [review]
patch v1
>+ [% IF url_base.length + no_limit_url.length > constants.CGI_URI_LIMIT %]
url_base doesn't exist. Do you mean urlbase?
>+ [% FOREACH field = cgi.param %]
>+ [% NEXT IF field == 'order'
>+ || field == 'cmdtype'
>+ || field == 'query_based_on'
>+ || field == 'token' %]
>+ <input type="hidden" name="[% field FILTER html %]"
>+ value="[% cgi.param(field) FILTER html %]">
>+ [% END %]
This code doesn't work with multi-valued fields, such as buglist.cgi?bug_id=1&bug_id=2&bug_id=1000. Your code pastes
<input type="hidden" name="bug_id" value="ARRAY(0x997b2b0)">
What dkl suggested is the right way to go: use global/hidden-fields.html.tmpl, which correctly handles multi-valued fields for us.
Attachment #748659 -
Flags: review?(LpSolit) → review-
Updated•11 years ago
|
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+
Target Milestone: --- → Bugzilla 4.4
Comment 8•9 years ago
|
||
Bugzilla 4.4 is now restricted to security fixes only.
Target Milestone: Bugzilla 4.4 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•