Requests containing URLs without a scheme are no longer accepted.

This commit is contained in:
Michael Lazar 2020-11-29 17:50:12 -05:00
parent 1c0508d127
commit 5e0415888a
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,11 @@
# Jetforce Changelog
### v0.7.0 (unreleased)
#### Spec Changes
- Requests containing URLs without a scheme are no longer accepted.
### v0.6.0 (2020-07-30)
#### Bugfixes

View File

@ -54,10 +54,9 @@ class Request:
raise ValueError("Missing hostname component")
if not url_parts.scheme:
# If scheme is missing, infer it to be gemini://
self.scheme = "gemini"
else:
self.scheme = url_parts.scheme
raise ValueError("Missing scheme component")
self.scheme = url_parts.scheme
# gemini://username@host/... is forbidden by the specification
if self.scheme == "gemini" and url_parts.username: