diff --git a/CHANGELOG.md b/CHANGELOG.md index 47908c4..ac512bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ #### Spec Changes - Requests containing URLs without a scheme are no longer accepted. +- The server will stop redirecting the root URL "gemini://example.com" to + "gemini://example.com/". These URLs are cannonically the same per the url RFC + definition and should both return successful responses. ### v0.6.0 (2020-07-30) diff --git a/jetforce/app/static.py b/jetforce/app/static.py index 991e171..dbb6cbe 100644 --- a/jetforce/app/static.py +++ b/jetforce/app/static.py @@ -124,7 +124,7 @@ class StaticDirectoryApplication(JetforceApplication): return Response(Status.SUCCESS, mimetype, generator) elif filesystem_path.is_dir(): - if not request.path.endswith("/"): + if request.path and not request.path.endswith("/"): url_parts = urllib.parse.urlparse(request.url) # noinspection PyProtectedMember url_parts = url_parts._replace(path=request.path + "/")