0

[![enter image description here][1]][1]

Below image has command [1]: https://i.stack.imgur.com/aTH9u.png

1 Answers1

0

HTTP/2 is negotiated in one of three ways:

  1. As part of the HTTPS set up when using HTTPS - this is the recommended method
  2. As an upgrade when using HTTP after establishing the initial connection over HTTP/1.1. Note this is rarely used so is due to be deprecated in next release of HTTP/2 spec.
  3. By connecting directly using HTTP/2 when on HTTP if you know for certain it supports HTTP/2 by telling you client this.

You are using HTTP not HTTPS so the first option it not available to you.

So it used the second option. It DID use HTTP/2 - you can see that in the second half of your request. But see my note about deprecation.

If you want ti go straight to HTTP/2 for curl you can use the --http2-prior-knowledge command line option.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92
  • Thank You "Barry Pollard". My concern is apache traffic communicating on HTTP/1.1 instead of HTTP2. I want to disable HTTP/1.1 so that by default communication should happen on HTTP2. how can I achieve this? – Yogesh Deshmukh Oct 22 '21 at 14:13
  • Seems you don't want to support the second option. So you need to either support HTTPS, or change whatever clients are connecting to assume it's an HTTP/2 server (assuming you are in control of them, and that it can be configured there). Why do you want to drop HTTP/1.1 out of interest? – Barry Pollard Oct 22 '21 at 15:51