Computer Networking - How to check if a site is using HTTP / 2?

method

  1. HTTP / 2 with ": authority" head instead of "Host" header.
  2. Chrome F12 inside, HTTP / 1.1 has a "view source", and HTTP / 2 is a binary, not "view source".
  3. Chrome F12 Network which set the "Protocol".
  4. Some sites offer these services. For example https://tools.keycdn.com/http2-test

TL; DR raised the issue of process

Looking at an article about the nginx. http://nginx.org/en/docs/http/request_processing.html . There are some words:. In this configuration nginx tests only the request's header field "Host" to determine which server the request should be routed to
then pick a Web site, look for "Host" header, found that some sites do not. Check MDN, saying that we have this head.

A Host header field must be sent in all HTTP/1.1 request messages. A 400 (Bad Request) status code will be sent to any HTTP/1.1 request message that lacks a Host header field or contains more than one.

Serious look, turned out to be HTTP / 1.1.
Discovery ": authority" and the "Host" is similar to the first, then google. Find https://stackoverflow.com/questions/36019868/authority-http-header-in-chrome-dev-tools .

In addition, some requests can not be found Chorme F12 "view source", google it. https://stackoverflow.com/questions/40800140/how-does-view-source-in-response-headers-go-missing-for-certain-sites
original HTTP / 2 is binary and can not view source. Read some sites and found HTTP / 2 penetration pricey. It attracted the interest of learning research HTTP / 2 in.

Guess you like

Origin www.cnblogs.com/allen2333/p/12016580.html