==== Normal requests ====
For normal requests the output ''is'' produced, but the query variables
are dumped in a wrong way. For example, for request 'GET
/test/?items=Oops' the dump will contain a table:
** GET **
|| Variable || Value ||
|| O || `''` ||
|| o || `''` ||
|| p || `''` ||
|| s || `''` ||
This is because `TECHNICAL_500_TEMPLATE` iterates QueryDict this way:
{{{
{% for var in filtered_POST.items %} ... {{ var.0 }} ... {{ var.1 }} ...
}}}
==== Ajax requests ====
For ajax requests the plain text error report generation itself raises an
exception:
{{{
ValueError: Need 2 values to unpack in for loop; got 1.
}}}
The console gets flooded with the tracedumps and the upstream eventually
receives a `502 Bad Gateway`.
This is because `TECHNICAL_500_TEXT_TEMPLATE` iterates QueryDict this way:
{{{
{% for k, v in request.GET.items %} ... {{ k }} ... {{ v }} ...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27191>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
[https://github.com/django/django/pull/7215 PR] with tests and the fix.
--
Ticket URL: <https://code.djangoproject.com/ticket/27191#comment:1>
* has_patch: 0 => 1
* component: Uncategorized => Error reporting
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27191#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"7b6dccc82fa5b03cf431742c0655e5ac954e228e" 7b6dccc8]:
{{{
#!CommitTicketReference repository=""
revision="7b6dccc82fa5b03cf431742c0655e5ac954e228e"
Fixed #27191 -- Fixed debug view crash for requests with 'items' in
GET/POST/COOKIES/FILES.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27191#comment:3>