MCPcopy Create free account
hub / github.com/apache/arrow / case_insensitive_header_lookup

Function case_insensitive_header_lookup

python/pyarrow/tests/test_flight.py:630–636  ·  view source on GitHub ↗

Lookup the value of given key in the given headers. The key lookup is case-insensitive.

(headers, lookup_key)

Source from the content-addressed store, hash-verified

628
629
630def 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
639class ClientHeaderAuthMiddlewareFactory(ClientMiddlewareFactory):

Callers 4

received_headersMethod · 0.85
start_callMethod · 0.85
do_actionMethod · 0.85
do_actionMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected