From dc27d19b213bdca464ceb0783e29932a0018e99e Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Tue, 4 Jul 2023 21:21:33 +1200 Subject: [PATCH] AK: Remove superfluous check for file state in URL basic parse The spec does not mention any of the other checks we were doing. --- AK/URLParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/URLParser.cpp b/AK/URLParser.cpp index b126a0fcad..e0bc81fd46 100644 --- a/AK/URLParser.cpp +++ b/AK/URLParser.cpp @@ -947,8 +947,8 @@ URL URLParser::parse(StringView raw_input, Optional const& base_url, Option // 2. If buffer is a double-dot URL path segment, then: if (is_double_dot_path_segment(buffer.string_view())) { - // FIXME: 1. Shorten url’s path. - if (!url->m_paths.is_empty() && !(url->m_scheme == "file" && url->m_paths.size() == 1 && is_normalized_windows_drive_letter(url->m_paths[0]))) + // 1. Shorten url’s path. + if (!url->m_paths.is_empty()) url->m_paths.remove(url->m_paths.size() - 1); // 2. If neither c is U+002F (/), nor url is special and c is U+005C (\), append the empty string to url’s path.