Questions regarding HTTP/2

Discussion in 'General OpenLiteSpeed Discussion' started by Asking Student, Oct 7, 2016.

  1. Asking Student

    Asking Student New Member

    Hello there,

    I am currently writing my bachelor thesis about HTTP/2 and am currently looking at implementations.

    I have two questions regarding OpenLiteSpeed.

    1. Is ist only possible to configure HTTP/2 over TLS? I could not find a setting to enable h2c.
    2. Does OpenLiteSpeed fully support HTTP/2 prioritization?

    I hope someone can help me. :)
  2. lsfoo

    lsfoo Administrator


    So you are aware, we are aware of your questions. I'll get you the answers when we have the time to properly answer the questions.

  3. Asking Student

    Asking Student New Member

    Hi Kevin,

    thank you very much. I'm looking forward to it.
  4. lsfoo

    lsfoo Administrator

    1. OLS supports h2c via an "Upgrade" header.
    2. OLS supports stream priority via the bits in the stream header.

    Hope these answer your questions!
  5. Asking Student

    Asking Student New Member

    Thank you very much! I appreciate it.

    However I was not able to enable h2c via "Upgrade". I was only able to activate HTTP/2 for TLS connections (h2). Do you know by any chance how to make h2c work?
  6. lskagan

    lskagan Administrator

    We ran some tests today that confirmed that h2c does seem to work.
    localhost ~$ curl -I '' -H 'Host:' -H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Upgrade: h2c'
    HTTP/1.1 101 Switching Protocols
    Connection: Upgrade
    Upgrade: h2c
    As per http2 guide found on github
    A client that makes a request for an "http" URI without prior knowledge about support for HTTP/2 on the next hop uses the HTTP Upgrade mechanism (Section 6.7 of [RFC7230]). The client does so by making an HTTP/1.1 request that includes an Upgrade header field with the "h2c" token. Such an HTTP/1.1 request MUST include exactly one HTTP2-Settings (Section 3.2.1) header field.
    Best Regards,

Share This Page