Opened 13 years ago
Closed 13 years ago
#19294 closed Uncategorized (wontfix)
Strange WSGIRequest behavior
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | HTTP handling | Version: | 1.4 |
| Severity: | Normal | Keywords: | wsgi |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Looks like QUERY_STRING parsing has some problems:
>>> from django.core.handlers.wsgi import WSGIRequest
>>> r = WSGIRequest(dict(QUERY_STRING='toto=2;1', REQUEST_METHOD='GET', **{'wsgi.input':None}))
>>> r.GET['1']
u''
>>> r.GET
<QueryDict: {u'1': [u''], u'toto': [u'2']}>
>>> r = WSGIRequest(dict(QUERY_STRING='foo=1&bar=1;foo', REQUEST_METHOD='GET', **{'wsgi.input':None}))
>>> r.GET
<QueryDict: {u'foo': [u'1', u''], u'bar': [u'1']}>
Is that really expected ?
Note:
See TracTickets
for help on using tickets.
In fact, even if this is a weird behaviour. It looks like this is allowed byt the rfc...