aboutsummaryrefslogtreecommitdiffstats
path: root/components/net
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2018-12-03 01:44:42 -0500
committerJosh Matthews <josh@joshmatthews.net>2018-12-03 01:44:42 -0500
commitbf564cae5d709e23235d32594c5c3c587d778a38 (patch)
treed31b0d7502a81b0cd2ad916f0ae0d2000cb964b8 /components/net
parentd404a0cddd979feac883f1c6da432cd9e50c122f (diff)
downloadservo-bf564cae5d709e23235d32594c5c3c587d778a38.tar.gz
servo-bf564cae5d709e23235d32594c5c3c587d778a38.zip
net: Log HTTP request headers.
Diffstat (limited to 'components/net')
-rw-r--r--components/net/http_loader.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index 66bdce34f89..21402e37209 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -1195,6 +1195,13 @@ fn http_network_fetch(
.as_ref()
.map(|_| uuid::Uuid::new_v4().to_simple().to_string());
+ if log_enabled!(log::Level::Info) {
+ info!("request for {} ({:?})", url, request.method);
+ for header in request.headers.iter() {
+ info!(" - {:?}", header);
+ }
+ }
+
// XHR uses the default destination; other kinds of fetches (which haven't been implemented yet)
// do not. Once we support other kinds of fetches we'll need to be more fine grained here
// since things like image fetches are classified differently by devtools