mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
AK: Port URL m_paths to String
This commit is contained in:
parent
e9670862a0
commit
ef27750982
3 changed files with 10 additions and 10 deletions
|
@ -1523,7 +1523,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
buffer.append(':');
|
||||
}
|
||||
// 2. Append buffer to url’s path.
|
||||
url->m_paths.append(buffer.string_view());
|
||||
url->m_paths.append(buffer.to_string().release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
// 5. Set buffer to the empty string.
|
||||
|
@ -1561,7 +1561,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
|
||||
// 1. If c is U+003F (?), then set url’s query to the empty string and state to query state.
|
||||
if (code_point == '?') {
|
||||
url->m_paths[0] = buffer.string_view();
|
||||
url->m_paths[0] = buffer.to_string().release_value_but_fixme_should_propagate_errors();
|
||||
url->m_query = String {};
|
||||
buffer.clear();
|
||||
state = State::Query;
|
||||
|
@ -1569,7 +1569,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
// 2. Otherwise, if c is U+0023 (#), then set url’s fragment to the empty string and state to fragment state.
|
||||
else if (code_point == '#') {
|
||||
// NOTE: This needs to be percent decoded since the member variables contain decoded data.
|
||||
url->m_paths[0] = buffer.string_view();
|
||||
url->m_paths[0] = buffer.to_string().release_value_but_fixme_should_propagate_errors();
|
||||
url->m_fragment = String {};
|
||||
buffer.clear();
|
||||
state = State::Fragment;
|
||||
|
@ -1588,7 +1588,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
if (code_point != end_of_file) {
|
||||
URL::append_percent_encoded_if_necessary(buffer, code_point, URL::PercentEncodeSet::C0Control);
|
||||
} else {
|
||||
url->m_paths[0] = buffer.string_view();
|
||||
url->m_paths[0] = buffer.to_string().release_value_but_fixme_should_propagate_errors();
|
||||
buffer.clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue