Skip to content

Commit

Permalink
fix for weird requests with media types with extra /
Browse files Browse the repository at this point in the history
  • Loading branch information
djay committed Aug 23, 2023
1 parent 5d0f4dc commit 1b908d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plone/rest/negotiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def parse_accept_header(accept):
for media_range in accept.split(","):
media_type = media_range.split(";")[0].strip()
if "/" in media_type:
type_, subtype = media_type.split("/")
type_, subtype = media_type.split("/", 1)
media_types.append((type_, subtype))
return media_types

Expand Down

0 comments on commit 1b908d6

Please sign in to comment.