mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: remove stray .c_str() calls for absl::StrFormat() (#47578)
refactor: remove stray .c_str() calls for absl::StrFormat() StrFormat() understands std::string, std::string_view Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
@@ -394,7 +394,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::
|
||||
"HTTP/1.1 %i Internal Redirect\n"
|
||||
"Location: %s\n"
|
||||
"Non-Authoritative-Reason: WebRequest API\n\n",
|
||||
kInternalRedirectStatusCode, redirect_url_.spec().c_str());
|
||||
kInternalRedirectStatusCode, redirect_url_.spec());
|
||||
|
||||
// Cross-origin requests need to modify the Origin header to 'null'. Since
|
||||
// CorsURLLoader sets |request_initiator| to the Origin request header in
|
||||
|
||||
@@ -142,8 +142,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
|
||||
base::MakeRefCounted<net::HttpResponseHeaders>(absl::StrFormat(
|
||||
"HTTP/%d.%d %d %s", handshake_response_->http_version.major_value(),
|
||||
handshake_response_->http_version.minor_value(),
|
||||
handshake_response_->status_code,
|
||||
handshake_response_->status_text.c_str()));
|
||||
handshake_response_->status_code, handshake_response_->status_text));
|
||||
for (const auto& header : handshake_response_->headers)
|
||||
response_->headers->AddHeader(header->name, header->value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user