Do not try to parse http scheme further some reserved characters.
GitOrigin-RevId: 363ad7bf8022bddc6c3370abc6a8ee244d384759
This commit is contained in:
parent
bc5415ba88
commit
3b3b67b834
|
@ -48,7 +48,7 @@ string HttpUrl::get_url() const {
|
||||||
Result<HttpUrl> parse_url(Slice url, HttpUrl::Protocol default_protocol) {
|
Result<HttpUrl> parse_url(Slice url, HttpUrl::Protocol default_protocol) {
|
||||||
// url == [https?://][userinfo@]host[:port]
|
// url == [https?://][userinfo@]host[:port]
|
||||||
ConstParser parser(url);
|
ConstParser parser(url);
|
||||||
string protocol_str = to_lower(parser.read_till_nofail(':'));
|
string protocol_str = to_lower(parser.read_till_nofail(":/?#@[]"));
|
||||||
|
|
||||||
HttpUrl::Protocol protocol;
|
HttpUrl::Protocol protocol;
|
||||||
if (parser.start_with("://")) {
|
if (parser.start_with("://")) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user