Return the boundary associated with the payload if present. The boundary is extracted from the Content-Type header's `boundary' parameter, and it is unquoted.
(self, failobj=None)
| 848 | return utils.collapse_rfc2231_value(filename).strip() |
| 849 | |
| 850 | def get_boundary(self, failobj=None): |
| 851 | """Return the boundary associated with the payload if present. |
| 852 | |
| 853 | The boundary is extracted from the Content-Type header's `boundary' |
| 854 | parameter, and it is unquoted. |
| 855 | """ |
| 856 | missing = object() |
| 857 | boundary = self.get_param('boundary', missing) |
| 858 | if boundary is missing: |
| 859 | return failobj |
| 860 | # RFC 2046 says that boundaries may begin but not end in w/s |
| 861 | return utils.collapse_rfc2231_value(boundary).rstrip() |
| 862 | |
| 863 | def set_boundary(self, boundary): |
| 864 | """Set the boundary parameter in Content-Type to 'boundary'. |
no test coverage detected