Do not try to parse http scheme further some reserved characters.

GitOrigin-RevId: 363ad7bf8022bddc6c3370abc6a8ee244d384759
This commit is contained in:
levlam 2020-05-07 03:12:47 +03:00
parent bc5415ba88
commit 3b3b67b834
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ string HttpUrl::get_url() const {
Result<HttpUrl> parse_url(Slice url, HttpUrl::Protocol default_protocol) {
// url == [https?://][userinfo@]host[:port]
ConstParser parser(url);
string protocol_str = to_lower(parser.read_till_nofail(':'));
string protocol_str = to_lower(parser.read_till_nofail(":/?#@[]"));
HttpUrl::Protocol protocol;
if (parser.start_with("://")) {