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