Some time ago, I noticed that when encoding a name: value map to 'application/x-www-form-urlencoded it displays something similar (here I use Python):
>>> from urllib import urlencode >>> urlencode({'hello': '', 'blabla': 'hihi'}) 'blabla=hihi&hello='
But parsing (at least with Python) just breaks pairs with an empty value:
>>> from urlparse import parse_qs >>> parse_qs('blabla=hihi&hello=') {'blabla': ['hihi']}
So ... is this standard behavior? Where can I find a link to how www-form-urlencoded should be analyzed? I have googled for a while, found RFC for uris, W3c docs for forms, etc., but nothing about how empty values ββshould be handled. Can someone give me a pointer to this?
source share