Return a list of all the values for the named field. These will be sorted in the order they appeared in the original message, and may contain duplicates. Any fields deleted and re-inserted are always appended to the header list. If no such fields exist, failobj is
(self, name, failobj=None)
| 539 | # |
| 540 | |
| 541 | def get_all(self, name, failobj=None): |
| 542 | """Return a list of all the values for the named field. |
| 543 | |
| 544 | These will be sorted in the order they appeared in the original |
| 545 | message, and may contain duplicates. Any fields deleted and |
| 546 | re-inserted are always appended to the header list. |
| 547 | |
| 548 | If no such fields exist, failobj is returned (defaults to None). |
| 549 | """ |
| 550 | values = [] |
| 551 | name = name.lower() |
| 552 | for k, v in self._headers: |
| 553 | if k.lower() == name: |
| 554 | values.append(self.policy.header_fetch_parse(k, v)) |
| 555 | if not values: |
| 556 | return failobj |
| 557 | return values |
| 558 | |
| 559 | def add_header(self, _name, _value, **_params): |
| 560 | """Extended header setting. |