File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ async def calendar_html(request: web.Request) -> web.Response:
6767 if calendar_config .auth and not calendar_config .auth .validate_header (
6868 request .headers .get ("Authorization" , "" )
6969 ):
70- raise web .HTTPNotFound ( )
70+ raise web .HTTPUnauthorized ( headers = { hdrs . WWW_AUTHENTICATE : "Basic" } )
7171
7272 response = aiohttp_jinja2 .render_template (
7373 "calendar.html" , request , {"calendar" : calendar_config }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ async def test_unknown_calendar(client: TestClient) -> None:
1414
1515async def test_404_without_auth (client : TestClient ) -> None :
1616 response = await client .get ("/python-authed.html" )
17- assert response .status == 404
17+ assert response .status == 401
1818
1919
2020async def test_requires_auth (client : TestClient ) -> None :
You can’t perform that action at this time.
0 commit comments