Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions httpbin/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ def get_headers(hide_env=True):

if hide_env and ('show_env' not in request.args):
for key in ENV_HEADERS:
try:
del headers[key]
except KeyError:
pass
# Use the pop method to remove items from the headers dictionary
headers.pop(key, None)

return headers

return CaseInsensitiveDict(headers.items())


def semiflatten(multi):
Expand Down