Opened 3 years ago

Closed 3 years ago

#19294 closed Uncategorized (wontfix)

Strange WSGIRequest behavior

Reported by: gael@… 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 ?

Change History (1)

comment:1 Changed 3 years ago by gael@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

In fact, even if this is a weird behaviour. It looks like this is allowed byt the rfc...

Note: See TracTickets for help on using tickets.
Back to Top