Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d3231cb4
Unverified
Commit
d3231cb4
authored
Feb 18, 2025
by
zifeitong
Committed by
GitHub
Feb 18, 2025
Browse files
[Bugfix] Handle content type with optional parameters (#13383)
Signed-off-by:
Zifei Tong
<
zifeitong@gmail.com
>
parent
435b502a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+2
-1
No files found.
vllm/entrypoints/openai/api_server.py
View file @
d3231cb4
...
...
@@ -258,7 +258,8 @@ async def build_async_engine_client_from_engine_args(
async
def
validate_json_request
(
raw_request
:
Request
):
content_type
=
raw_request
.
headers
.
get
(
"content-type"
,
""
).
lower
()
if
content_type
!=
"application/json"
:
media_type
=
content_type
.
split
(
";"
,
maxsplit
=
1
)[
0
]
if
media_type
!=
"application/json"
:
raise
HTTPException
(
status_code
=
HTTPStatus
.
UNSUPPORTED_MEDIA_TYPE
,
detail
=
"Unsupported Media Type: Only 'application/json' is allowed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment