I'm analyzing some request headers with Google Chrome console (of my extension).
Some requests are normal:
Status Code:200 OK
Accept:*/*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8,es;q=0.6
Connection:keep-alive
Content-Length:119
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
And some other are very weird.
Status Code:200 OK
Request Headers
:host:myurl.com
:method:GET
:path:/
:scheme:https
:version:HTTP/1.1
... etc ...
Why I am getting this weird headers, like :host:, :method:, etc.?
What is causing it and how can I solve it and show regular format headers?
Here is some code for you to test:
var x = new XMLHttpRequest();
x.open('GET', 'https://google.com');
x.send();
Open the console and run the previous code snippet. Then go to the Network tab to see these strange headers.
These
:host,:method,:path,:schemeand:versionheaders are not caused by your extension or code, but by the fact that Google.com is accessed over SPDY instead of HTTP. If you open the developer tools and visit https://www.google.com/favicon.ico or any other site that supports SPDY (such as https://www.cloudflare.com/), then these request headers will also show up.For more (technical) information about these headers within the SPDY protocol, see http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1#TOC-3.2.1-Request.