Переглянути джерело

LibHTTP: Don't re-urlencode URL query strings

AK::URL stores the URL query string already encoded. We were sending
double-encoded query strings, which is why the Google cookie consent
page was not working correctly.
Andreas Kling 3 роки тому
батько
коміт
db2b67dc5e
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      Userland/Libraries/LibHTTP/HttpRequest.cpp

+ 1 - 1
Userland/Libraries/LibHTTP/HttpRequest.cpp

@@ -37,7 +37,7 @@ ByteBuffer HttpRequest::to_raw_request() const
     builder.append(URL::percent_encode(m_url.path(), URL::PercentEncodeSet::EncodeURI));
     if (!m_url.query().is_empty()) {
         builder.append('?');
-        builder.append(URL::percent_encode(m_url.query(), URL::PercentEncodeSet::EncodeURI));
+        builder.append(m_url.query());
     }
     builder.append(" HTTP/1.1\r\nHost: ");
     builder.append(m_url.host());