Skip to content

Commit

Permalink
Merge pull request #587 from Akoasm666/develop
Browse files Browse the repository at this point in the history
Fixed issue #497
  • Loading branch information
jacebrowning committed Dec 8, 2022
2 parents 201e439 + 1c847a9 commit cbee9bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doorstop/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def run(args, cwd, _):
@hook("before_request")
def strip_path():
request.environ["PATH_INFO"] = request.environ["PATH_INFO"].rstrip("/")
request.environ["PATH_INFO"] = request.environ["PATH_INFO"].rstrip(".html")
if len(request.environ["PATH_INFO"]) > 0 and request.environ["PATH_INFO"][-5:-1] == ".html":
request.environ["PATH_INFO"] = request.environ["PATH_INFO"][:-5]


@hook("after_request")
Expand Down

0 comments on commit cbee9bf

Please sign in to comment.