(cls, header)
| 538 | |
| 539 | @classmethod |
| 540 | def parse_header_name(cls, header): |
| 541 | if header.startswith(cls.HTTP_PREFIX): |
| 542 | header = header.removeprefix(cls.HTTP_PREFIX) |
| 543 | elif header not in cls.UNPREFIXED_HEADERS: |
| 544 | return None |
| 545 | return header.replace("_", "-").title() |
| 546 | |
| 547 | @classmethod |
| 548 | def to_wsgi_name(cls, header): |