Requests containing URLs without a scheme are no longer accepted.
This commit is contained in:
parent
1c0508d127
commit
5e0415888a
|
@ -1,5 +1,11 @@
|
||||||
# Jetforce Changelog
|
# Jetforce Changelog
|
||||||
|
|
||||||
|
### v0.7.0 (unreleased)
|
||||||
|
|
||||||
|
#### Spec Changes
|
||||||
|
|
||||||
|
- Requests containing URLs without a scheme are no longer accepted.
|
||||||
|
|
||||||
### v0.6.0 (2020-07-30)
|
### v0.6.0 (2020-07-30)
|
||||||
|
|
||||||
#### Bugfixes
|
#### Bugfixes
|
||||||
|
|
|
@ -54,9 +54,8 @@ class Request:
|
||||||
raise ValueError("Missing hostname component")
|
raise ValueError("Missing hostname component")
|
||||||
|
|
||||||
if not url_parts.scheme:
|
if not url_parts.scheme:
|
||||||
# If scheme is missing, infer it to be gemini://
|
raise ValueError("Missing scheme component")
|
||||||
self.scheme = "gemini"
|
|
||||||
else:
|
|
||||||
self.scheme = url_parts.scheme
|
self.scheme = url_parts.scheme
|
||||||
|
|
||||||
# gemini://username@host/... is forbidden by the specification
|
# gemini://username@host/... is forbidden by the specification
|
||||||
|
|
Loading…
Reference in New Issue