Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Allow Accept header to send multiple values #391

Merged
merged 1 commit into from
Aug 7, 2019
Merged
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
5 changes: 3 additions & 2 deletions pulp_docker/app/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ async def get_accepted_media_types(request):

"""
accepted_media_types = []
for header, value in request.raw_headers:
for header, values in request.raw_headers:
if header == b'Accept':
accepted_media_types.append(value.decode('UTF-8'))
values = [v.strip().decode('UTF-8') for v in values.split(b",")]
accepted_media_types.extend(values)
return accepted_media_types

@staticmethod
Expand Down