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:
67
67
if calendar_config .auth and not calendar_config .auth .validate_header (
68
68
request .headers .get ("Authorization" , "" )
69
69
):
70
- raise web .HTTPNotFound ( )
70
+ raise web .HTTPUnauthorized ( headers = { hdrs . WWW_AUTHENTICATE : "Basic" } )
71
71
72
72
response = aiohttp_jinja2 .render_template (
73
73
"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:
14
14
15
15
async def test_404_without_auth (client : TestClient ) -> None :
16
16
response = await client .get ("/python-authed.html" )
17
- assert response .status == 404
17
+ assert response .status == 401
18
18
19
19
20
20
async def test_requires_auth (client : TestClient ) -> None :
You can’t perform that action at this time.
0 commit comments