(param)
| 27 | |
| 28 | |
| 29 | def _splitparam(param): |
| 30 | # Split header parameters. BAW: this may be too simple. It isn't |
| 31 | # strictly RFC 2045 (section 5.1) compliant, but it catches most headers |
| 32 | # found in the wild. We may eventually need a full fledged parser. |
| 33 | # RDM: we might have a Header here; for now just stringify it. |
| 34 | a, sep, b = str(param).partition(';') |
| 35 | if not sep: |
| 36 | return a.strip(), None |
| 37 | return a.strip(), b.strip() |
| 38 | |
| 39 | def _formatparam(param, value=None, quote=True): |
| 40 | """Convenience function to format and return a key=value pair. |
no test coverage detected
searching dependent graphs…