Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h2 websockets backport for 2.4.x #366

Closed
wants to merge 32 commits into from
Closed

Commits on Aug 23, 2023

  1. Merge 1907696,1907697 from trunk:

      *) mod_http2: new directive 'H2MaxDataFrameLen n' to limit the maximum
         amount of response body bytes put into a single HTTP/2 DATA frame.
         Setting this to 0 places no limit (but the max size allowed by the
         protocol is observed).
         The module, by default, tries to use the maximum size possible, which is
         somewhat around 16KB. This sets the maximum. When less response data is
         available, smaller frames will be sent.
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1af7a87 View commit details
    Browse the repository at this point in the history
  2. Merge r1909769 from trunk (plus sync mod_http2.xml)

      *) mod_http2: v2.0.15 with the following fixes and improvements
         - New directive 'H2EarlyHint name value' to add headers to a response,
           picked up already when a "103 Early Hints" response is sent. 'name' and
           'value' must comply to the HTTP field restrictions.
           This directive can be repeated several times and header fields of the
           same names add. Sending a 'Link' header with 'preload' relation will
           also cause a HTTP/2 PUSH if enabled and supported by the client.
         - Fixed an issue where requests were not logged and accounted in a timely
           fashion when the connection returns to "keepalive" handling, e.g. when
           the request served was the last outstanding one.
           This led to late appearance in access logs with wrong duration times
           reported.
         - Accurately report the bytes sent for a request in the '%O' Log format.
           This addresses apache#203, a long outstanding issue where mod_h2 has reported
           numbers over-eagerly from internal buffering and not what has actually
           been placed on the connection.
           The numbers are now the same with and without H2CopyFiles enabled.
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5790a21 View commit details
    Browse the repository at this point in the history
  3. Merge r1910157 from trunk

     * mod_proxy_http2: fixed using the wrong "bucket_alloc" from the backend
       connection when sending data on the frontend one. This caused crashes
       or infinite loops in rare situations.
     * mod_proxy_http2: fixed a bug in retry/response handling that could lead
       to wrong status codes or HTTP messages send at the end of response bodies
       exceeding the announced content-length.
     * mod_proxy_http2: fix retry handling to not leak temporary errors.
       On detecting that that an existing connection was shutdown by the other
       side, a 503 response leaked even though the request was retried on a
       fresh connection.
     * mod_http2: fixed a bug that did cleanup of consumed and pending buckets in
       the wrong order when a bucket_beam was destroyed.
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f78ede8 View commit details
    Browse the repository at this point in the history
  4. Merge of 1910331,1910386,1910441 from trunk

      *) mod_http2: fixed a bug in flushing pending data on an already closed
         connection that could lead to a busy loop, preventing the HTTP/2 session
         to close down successfully. Fixed PR 66624.
         Fixed a bug that could lead to a crash in main connection
         output handling. This occured only when the last request on a HTTP/2
         connection had been processed and the session decided to shut down.
         This could lead to an attempt to send a final GOAWAY while the previous
         write was still in progress. See PR 66646.
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5ddf583 View commit details
    Browse the repository at this point in the history
  5. *) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as

         described in RFC 8441. A new directive 'H2WebSockets on|off' has been
         added. The feature is by default not enabled.
         As also discussed in the manual, this feature should work for setups
         using "ProxyPass backend-url upgrade=websocket" without further changes.
         Special server modules for WebSockets will have to be adapted,
         most likely, as the handling if IO events is different with HTTP/2.
         HTTP/2 WebSockets are supported on platforms with native pipes. This
         excludes Windows.
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910507 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    41f28fc View commit details
    Browse the repository at this point in the history
  6. *) mod_http2: adding checks for websocket support on platform and

         server versions. Give error message accordingly when trying to
         enable websockets in unsupported configurations.
         Add test and code to check the, finally selected, server of
         a request_rec for websocket support or 501 the request.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910535 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    28c014a View commit details
    Browse the repository at this point in the history
  7. mod_http2: optimization for c1 output passing when collecting

               next DATA frame for a response.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910648 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e82bf6f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    768591d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6d71adb View commit details
    Browse the repository at this point in the history
  10. tests: add the websockets python module version checks needed for our…

    … CI infra
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910654 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    acda877 View commit details
    Browse the repository at this point in the history
  11. *) mod_http2: new directive H2ProxyRequests on|off to enable handling

         of HTTP/2 requests in a forward proxy configuration.
         General forward proxying is enabled via `ProxyRequests`. If the
         HTTP/2 protocol is also enabled for such a server/host, this new
         directive is needed in addition.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910656 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ec5d0cf View commit details
    Browse the repository at this point in the history
  12. lognos for the new debugs

    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910658 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9af2ab5 View commit details
    Browse the repository at this point in the history
  13. test_800_websockets: AH10467 is an expected error for the _fail_proto…

    … test.
    
    So ignore it, and move the _fail_proto test first to avoid messing up with
    the error logs of the other tests.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910667 13f79535-47bb-0310-9956-ffa450edef68
    ylavic authored and icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6ee3cb4 View commit details
    Browse the repository at this point in the history
  14. mod_http2: move get_pollfd_from_conn hook outside the HAS_RESPONSE_BU…

    …CKET part
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910685 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    17f9f5a View commit details
    Browse the repository at this point in the history
  15. mod_http2: when failing a request, make sure the request_rec fields

    are populated (best effort) for the response generation since this
    might access fields in there.
    Respect a http_status already assigned during stream processing
    for error generation.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910686 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6c869df View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e6610cc View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    da7d510 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ff5fbea View commit details
    Browse the repository at this point in the history
  19. tests: sync with other branches

    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cbd8893 View commit details
    Browse the repository at this point in the history
  20. proxy: in proxy tunnels, use the smaller timeout value of

           client and origin as timeout for polling the tunnel.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910704 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8f51885 View commit details
    Browse the repository at this point in the history
  21. proxy_util: revert timeout selection on a proxy tunnel back to

    take the large of client/origin values.
    
    Add websocket test to verify that longer proxypass timeout is in
    effect.
    
    
    
    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910809 13f79535-47bb-0310-9956-ffa450edef68
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    893efea View commit details
    Browse the repository at this point in the history
  22. HTTP/2, websockets

    - provide "Connection" header in internal Upgrade request
    - set input notification if input is already available when
     stream processing is started
    - add optional function in mod_http2.h to use instead of
     ap_get_pollfd_from_conn() in older servers with a new
     mod_http2
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    eb1198c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    832142a View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    a4c4ffd View commit details
    Browse the repository at this point in the history
  25. Fixes after review by rpluem

    - re-add ap_mmn comment for 128 minor version
    - reverted most changes of apr_strnatcasecmp() to ap_cstr_casecmp()
      since the former has special whitespace handling which *may* mattter
      in certain cases
    - fixed log message when wrong Sec-WebSocket-Accept response
      header was found
    icing committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c22917d View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    b3e89ef View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    80b3883 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    2d619de View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Fixes after review by @tititiou36

    icing committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    51c6dbe View commit details
    Browse the repository at this point in the history
  2. Increase delay in stutter check 712_02 for cpu starved CI runs

    - eliminiate 712_03 as being then really the same as 712_02
    icing committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    51f9ac0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    578c1ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f2b3db5 View commit details
    Browse the repository at this point in the history