Skip to content

Commit

Permalink
Change normalize_path_middleware redirect from 301 -> 308
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkav committed Jan 25, 2019
1 parent c145bd8 commit 6892d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiohttp/web_middlewares.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
from typing import TYPE_CHECKING, Awaitable, Callable, Tuple, Type, TypeVar

from .web_exceptions import HTTPMove, HTTPMovedPermanently
from .web_exceptions import HTTPMove, HTTPPermanentRedirect
from .web_request import Request
from .web_response import StreamResponse
from .web_urldispatcher import SystemRoute
Expand Down Expand Up @@ -42,7 +42,7 @@ def middleware(f: _Func) -> _Func:
def normalize_path_middleware(
*, append_slash: bool=True, remove_slash: bool=False,
merge_slashes: bool=True,
redirect_class: Type[HTTPMove]=HTTPMovedPermanently) -> _Middleware:
redirect_class: Type[HTTPMove]=HTTPPermanentRedirect) -> _Middleware:
"""
Middleware factory which produces a middleware that normalizes
the path of a request. By normalizing it means:
Expand Down

0 comments on commit 6892d31

Please sign in to comment.