(self, failobj, header)
| 666 | self._default_type = ctype |
| 667 | |
| 668 | def _get_params_preserve(self, failobj, header): |
| 669 | # Like get_params() but preserves the quoting of values. BAW: |
| 670 | # should this be part of the public interface? |
| 671 | missing = object() |
| 672 | value = self.get(header, missing) |
| 673 | if value is missing: |
| 674 | return failobj |
| 675 | params = [] |
| 676 | for p in _parseparam(value): |
| 677 | try: |
| 678 | name, val = p.split('=', 1) |
| 679 | name = name.strip() |
| 680 | val = val.strip() |
| 681 | except ValueError: |
| 682 | # Must have been a bare attribute |
| 683 | name = p.strip() |
| 684 | val = '' |
| 685 | params.append((name, val)) |
| 686 | params = utils.decode_params(params) |
| 687 | return params |
| 688 | |
| 689 | def get_params(self, failobj=None, header='content-type', unquote=True): |
| 690 | """Return the message's Content-Type parameters, as a list. |
no test coverage detected