This was mostly fixed as part of wadllib 1.3.3, since that now arranges to always add a filename attribute to Content-Disposition for binary parameters:
- Implement a subset of MIME multipart/form-data encoding locally rather
than using the standard library's email module, which doesn't have good
handling of binary parts and corrupts bytes in them that look like line
endings in various ways depending on the Python version. [bug=1729754]
However, versions of wadllib that lack this fix may still be in the wild (we only SRUed that back to xenial, and I hear that other distributions exist too), so we may need to wait a while longer before dropping this workaround.
Also, lazr.restful.testing.webservice has a similar issue, because it sends named POST requests as application/x-www-form-urlencoded rather than as multipart/form-data. We'll need to fix it to create a multipart/form-data document in a similar way to wadllib.
This was mostly fixed as part of wadllib 1.3.3, since that now arranges to always add a filename attribute to Content-Disposition for binary parameters:
- Implement a subset of MIME multipart/form-data encoding locally rather
than using the standard library's email module, which doesn't have good
handling of binary parts and corrupts bytes in them that look like line
endings in various ways depending on the Python version. [bug=1729754]
However, versions of wadllib that lack this fix may still be in the wild (we only SRUed that back to xenial, and I hear that other distributions exist too), so we may need to wait a while longer before dropping this workaround.
Also, lazr.restful. testing. webservice has a similar issue, because it sends named POST requests as application/ x-www-form- urlencoded rather than as multipart/ form-data. We'll need to fix it to create a multipart/form-data document in a similar way to wadllib.