Skip to content

Commit

Permalink
Show HTTP response headers in debug output.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Apr 17, 2017
1 parent ca3cd64 commit 525e9c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/net/http_loader.rs
Expand Up @@ -1095,6 +1095,13 @@ fn http_network_fetch(request: &Request,
Err(error) => return Response::network_error(error),
};

if log_enabled!(log::LogLevel::Info) {
info!("response for {}", url);
for header in res.response.headers.iter() {
info!(" - {}", header);
}
}

let mut response = Response::new(url.clone());
response.status = Some(res.response.status);
response.raw_status = Some((res.response.status_raw().0,
Expand Down

0 comments on commit 525e9c0

Please sign in to comment.