saving octet-stream png file

Jon Ribbens jon+usenet at unequivocal.eu
Mon Aug 22 17:28:56 EDT 2016


On 2016-08-22, Larry Martell <larry.martell at gmail.com> wrote:
> On Mon, Aug 22, 2016 at 1:25 PM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> On 2016-08-22, Larry Martell <larry.martell at gmail.com> wrote:
>>> (Pdb) type(request.POST[key])
>>><type 'unicode'>
>>> (Pdb) request.encoding = "iso-8859-1"
>>> (Pdb) type(request.POST[key])
>>> *** MultiValueDictKeyError:
>>> "u'right-carotidartery:63B2E474-D690-445F-B92A-31EBADDC9D93.png'"
>>
>> Sounds like you should be filing a bug report with Django.
>
> Turns out that is expected behavior -- request.encoding clears
> existing GET/POST data. Not sure how it's useful to set that then.

Yeah it clears the cached parsed data, but when you fetch a value
afterwards it should automatically recalculate the data, not fail.



More information about the Python-list mailing list