Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite54be85

Browse files
authored
Check if "extensions" in scope before checking the extension (#2438)
1 parent8d09cf4 commite54be85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎starlette/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
337337
)
338338
ifscope["method"].upper()=="HEAD":
339339
awaitsend({"type":"http.response.body","body":b"","more_body":False})
340-
elif"http.response.pathsend"inscope["extensions"]:
340+
elif"extensions"inscopeand"http.response.pathsend"inscope["extensions"]:
341341
awaitsend({"type":"http.response.pathsend","path":str(self.path)})
342342
else:
343343
asyncwithawaitanyio.open_file(self.path,mode="rb")asfile:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp