Skip to content

Commit

Permalink
Log negotiated protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks committed Aug 15, 2024
1 parent e3afec1 commit 22876d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/http/http_stream_factory_job.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class HttpStreamFactory::Job {

void SetPriority(RequestPriority priority);

const GURL& origin_url() const { return origin_url_; }
RequestPriority priority() const { return priority_; }
bool was_alpn_negotiated() const;
NextProto negotiated_protocol() const;
Expand Down
11 changes: 11 additions & 0 deletions net/http/http_stream_factory_job_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,17 @@ void HttpStreamFactory::JobController::OnStreamReady(
std::unique_ptr<HttpStream> stream = job->ReleaseStream();
DCHECK(stream);

{
const char* jobtypename[] = {"main", "alternative", "dns_alpn_h3", "preconnect",
"preconnect_dns_alpn_h3"};
LOG(INFO) << __FUNCTION__ << " negotiated_protocol = "
<< NextProtoToString(job->negotiated_protocol())
<< " was_alpn_negotiated=" << job->was_alpn_negotiated()
<< " using_spdy=" << job->using_spdy()
<< " using_quic=" << job->using_quic()
<< " job_type=" << jobtypename[(int)job->job_type()] << " "
<< job->origin_url().spec();
}
MarkRequestComplete(job->was_alpn_negotiated(), job->negotiated_protocol(),
job->using_spdy());

Expand Down

0 comments on commit 22876d1

Please sign in to comment.