Message318153
When using `urllib.parse.urlencode` it is impossible to pass an empty list when doseq=True.
So, I see the following behavior when using urlencode:
In [3]: urlencode({'key': ['value']}, doseq=True)
Out[3]: 'key=value'
In [4]: urlencode({'key': []}, doseq=True)
Out[4]: ''
So, in our source code, we do urlecode(params, doseq=True), which can have keys with empty list as values and it gets dropped completely. To get it to work properly, I instead pass around an empty string as a value when the length of list is 0, which conveys the server that the value of the key is empty.
I wonder if it would make sense for urlencode to do that by default given doseq=True is meant to encode lists properly. |
|
Date |
User |
Action |
Args |
2018-05-30 04:57:25 | maxking | set | recipients:
+ maxking |
2018-05-30 04:57:25 | maxking | set | messageid: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> |
2018-05-30 04:57:25 | maxking | link | issue33690 messages |
2018-05-30 04:57:25 | maxking | create | |
|