Lookup the value of given key in the given headers. The key lookup is case-insensitive.
(headers, lookup_key)
| 630 | |
| 631 | |
| 632 | def case_insensitive_header_lookup(headers, lookup_key): |
| 633 | """Lookup the value of given key in the given headers. |
| 634 | The key lookup is case-insensitive. |
| 635 | """ |
| 636 | for key in headers: |
| 637 | if key.lower() == lookup_key.lower(): |
| 638 | return headers.get(key) |
| 639 | |
| 640 | |
| 641 | class ClientHeaderAuthMiddlewareFactory(ClientMiddlewareFactory): |
no test coverage detected