mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird: Update for removal of StringView(char const*)
This commit is contained in:
parent
80636d6779
commit
2bbf2dfb9a
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2bbf2dfb9a Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg
2 changed files with 6 additions and 6 deletions
|
@ -29,7 +29,7 @@ String CookieJar::get_cookie(const URL& url, Web::Cookie::Source source)
|
|||
for (auto const& cookie : cookie_list) {
|
||||
// If there is an unprocessed cookie in the cookie-list, output the characters %x3B and %x20 ("; ")
|
||||
if (!builder.is_empty())
|
||||
builder.append("; ");
|
||||
builder.append("; "sv);
|
||||
|
||||
// Output the cookie's name, the %x3D ("=") character, and the cookie's value.
|
||||
builder.appendff("{}={}", cookie.name, cookie.value);
|
||||
|
@ -50,9 +50,9 @@ void CookieJar::set_cookie(const URL& url, Web::Cookie::ParsedCookie const& pars
|
|||
|
||||
void CookieJar::dump_cookies() const
|
||||
{
|
||||
constexpr StringView key_color = "\033[34;1m";
|
||||
constexpr StringView attribute_color = "\033[33m";
|
||||
constexpr StringView no_color = "\033[0m";
|
||||
constexpr auto key_color = "\033[34;1m"sv;
|
||||
constexpr auto attribute_color = "\033[33m"sv;
|
||||
constexpr auto no_color = "\033[0m"sv;
|
||||
|
||||
StringBuilder builder;
|
||||
builder.appendff("{} cookies stored\n", m_cookies.size());
|
||||
|
|
|
@ -73,14 +73,14 @@ void RequestManagerQt::Request::did_finish()
|
|||
for (auto& it : m_reply.rawHeaderPairs()) {
|
||||
auto name = String(it.first.data(), it.first.length());
|
||||
auto value = String(it.second.data(), it.second.length());
|
||||
if (name.equals_ignoring_case("set-cookie")) {
|
||||
if (name.equals_ignoring_case("set-cookie"sv)) {
|
||||
set_cookie_headers.append(value);
|
||||
} else {
|
||||
response_headers.set(name, value);
|
||||
}
|
||||
}
|
||||
if (!set_cookie_headers.is_empty()) {
|
||||
response_headers.set("set-cookie", JsonArray { set_cookie_headers }.to_string());
|
||||
response_headers.set("set-cookie"sv, JsonArray { set_cookie_headers }.to_string());
|
||||
}
|
||||
on_buffered_request_finish(success, buffer.length(), response_headers, http_status_code, ReadonlyBytes { buffer.data(), (size_t)buffer.size() });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue