91 Commits

Author SHA1 Message Date
c69a51bff8 *) mod_http2: sync with module's github.
- on newer HTTPD versions, return connection monitoring
      to the event MPM when block on client updates.
      2.4.x versions still treat connections in the event
      MPM as KeepAlive and purge them on load in the middle
      of response processing.
    - spelling fixes
    - support for yield calls in c2 "network" filter



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918003 13f79535-47bb-0310-9956-ffa450edef68
2024-05-27 11:04:52 +00:00
8943c469eb * mod_http2: improved early cleanup of streams.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912999 13f79535-47bb-0310-9956-ffa450edef68
2023-10-16 08:57:51 +00:00
84430d7f0b * mod_http2: fixed a bug in handling of stream timeouts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912385 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 07:55:16 +00:00
d62d3143f4 *) mod_http2: Fix reporting of Total Accesses in server-status to not count
HTTP/2 requests twice. Fixes PR 66801.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911291 13f79535-47bb-0310-9956-ffa450edef68
2023-07-26 12:18:06 +00:00
bdd49d3845 *) 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 #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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909769 13f79535-47bb-0310-9956-ffa450edef68
2023-05-12 11:28:59 +00:00
61ebb22bf9 Sync with v2.0.10 from github:
* Extensive testing in production done by Alessandro Bianchi (@alexskynet)
   on the v2.0.x versions for stability. Many thanks!
 * refactored stream response handling to reflect the different phases
   (response/data/trailers) more clearly and help resolving cpu busy loops.
 * Adding more negative tests for handling of errored responses to cover
   edge cases.
 * mod_http2: fixed handling of response where neiter an EOS nor an ERROR was
   received as a cause to reset the stream.
 * mod_proxy_http2: generating error buckets for fault response bodies, to
   signal failure to fron when response header were already sent.

v2.0.9
--------------------------------------------------------------------------------
 * Fixed a bug where errors during reponse body handling did not lead to
   a proper RST_STREAM. Instead processing went into an infinite loop.
   Extended test cases to catch this condition.

v2.0.8
--------------------------------------------------------------------------------
 * Delaying input setup of a stream just before processing starts. This allows
   any EOS indicator arriving from the client before that to take effect.
   Without knowing that a stream has no input, internal processing has to
   simulate chunked encoding. This is not wrong, but somewhat more expensive
   and mod_security has been reported to be allergic to seeing 'chunked'
   on some requests. See <https://bz.apache.org/bugzilla/show_bug.cgi?id=66282>.
 * mod_proxy_http2: fixed #235 by no longer forwarding 'Host:' header when
   request ':authority' is known. Improved test case that did not catch that
   the previous 'fix' was incorrect.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904522 13f79535-47bb-0310-9956-ffa450edef68
2022-10-11 14:54:08 +00:00
b88117f602 *) mod_http2: type adjustments and castings for int/apr_uint32_t/apr_size_t/apr_off_t.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904297 13f79535-47bb-0310-9956-ffa450edef68
2022-09-27 10:53:51 +00:00
8476af1eb6 *) mod_http2: new directive "H2HeaderStrictness" to control the compliance
level of header checks as defined in the HTTP/2 RFCs. Default is 7540.
     9113 activates the checks for forbidden leading/trailing whitespace in
     field values (available from nghttp2 v1.50.0 on).

   - source sync with github version
   - fix for keepalive idle wait in mpm_worker setup
   - ensuring EOS when secondary connection has been handled
   - fixed race in late input EOS arrival when stream was
     already scheduled for execution.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904269 13f79535-47bb-0310-9956-ffa450edef68
2022-09-26 12:29:47 +00:00
ff2ed5d739 *) mod_http2: new implementation of h2 worker pool.
- O(1) cost at registration of connection processing producers
     - no limit on registered producers
     - join of ongoing work on unregister
     - callbacks to unlink dependencies into other h2 code
     - memory cleanup on workers deactivation (on idle timeouts)
     - idle_limit as apr_time_t instead of seconds



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902005 13f79535-47bb-0310-9956-ffa450edef68
2022-06-17 09:24:57 +00:00
887ffec712 *) mod_http2: use new ap_sb_get_child_thread() to get child_num
and create unique h2 session identifiers in logging that stay
     unique among re-activations of the master connection.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900030 13f79535-47bb-0310-9956-ffa450edef68
2022-04-19 10:17:05 +00:00
5d3b2f1f0c *) mod_http2: use the new REQUEST buckets to forward request
on secondary connections. Use the now generic
     ap_process_connection() in h2 workers to process those.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899802 13f79535-47bb-0310-9956-ffa450edef68
2022-04-13 08:38:12 +00:00
8da00af1c0 *) mod_http2: removed extra h2_mplx_worker_c2_done() arg
to retrive another c2 for processing. Just added
     complexity without measurable benefits.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899149 13f79535-47bb-0310-9956-ffa450edef68
2022-03-23 09:15:30 +00:00
32efaf07fd *) mod_http2: use pollset only for main connection and wakeups
for events on streams. Provide streams in INPUT pipe when
     needed and supported on the platform.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899102 13f79535-47bb-0310-9956-ffa450edef68
2022-03-21 08:19:28 +00:00
6bd9d17e08 *) core: adding a new hook and method to the API:
create_secondary_connection and ap_create_secondary_connection()
     to setup connections related to a "master" one, as used in
     the HTTP/2 protocol implementation.

  *) mod_http2: using the new API calls to get rid of knowledge
     about how the core handles conn_rec specifics.
     Improvements in pollset stream handling to use less sets.
     Using atomic read/writes instead of volatiles now.
     Keeping a reserve of "transit" pools and bucket_allocs for
     use on secondary connections to avoid repeated setup/teardowns.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899032 13f79535-47bb-0310-9956-ffa450edef68
2022-03-18 09:52:52 +00:00
1598f7aebd *) mod_http2: fixed a bug in v2.0.0 that could lead to an infinite
loop when clients close connections prematurely.
     Enhanced the scoreboard status updates on h2 connections for
     mod_status. 'server-status' now gives a better idea what the
     connection is working on.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895614 13f79535-47bb-0310-9956-ffa450edef68
2021-12-06 10:34:27 +00:00
6a355db082 *) mod_http2:
- Fixed an issue since 1.15.24 that "Server" headers in proxied requests
       were overwritten instead of preserved. [PR by @daum3ns]
     - Added directove 'H2StreamTimeout' to configure a separate value for HTTP/2
       streams, overriding server's 'Timeout' configuration. [rpluem]
     - HTTP/2 connections now use pollsets to monitor the status of the
       ongoing streams and their main connection when host OS allows this.
     - Removed work-arounds for older versions of libnghttp2 and checking
       during configure that at least version 1.15.0 is present.
     - The HTTP/2 connection state handler, based on an experiment and draft
       at the IETF http working group (abandoned for some time), has been removed.
     - H2SerializeHeaders no longer has an effect. A warning is logged when it is
       set to "on". The switch enabled the internal writing of requests to be parsed
       by the internal HTTP/1.1 protocol handler and was introduced to avoid
       potential incompatibilities during the introduction of HTTP/2.
     - Removed the abort/redo of tasks when mood swings lower the active limit.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894163 13f79535-47bb-0310-9956-ffa450edef68
2021-10-12 13:34:01 +00:00
2cec2d15c9 *) mod_http2: workaround to facilitate use of common internal protocol/method/uri
checks. The module now handles master/secondary connections and has marked
     methods according to use.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878926 13f79535-47bb-0310-9956-ffa450edef68
2020-06-17 15:10:29 +00:00
3be04bffda *) mod_http2: fixed a bug that prevented proper stream cleanup when connection
throttling was in place. Stream resets by clients on streams initiated by them
     are counted as possible trigger for throttling.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1862865 13f79535-47bb-0310-9956-ffa450edef68
2019-07-10 10:18:15 +00:00
5b32f27b77 * modules/http2: reverting r1859724, as no good.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1860257 13f79535-47bb-0310-9956-ffa450edef68
2019-05-28 12:42:17 +00:00
d5767ac605 *) mod_http2: internal code cleanups and simplifications. Common output code for
h2 and h2c protocols, using nested mutex locks for simplified calls. [Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1859724 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 13:41:36 +00:00
9b3dd74c58 *) mod_http2: new configuration directive: ``H2Padding numbits`` to control
padding of HTTP/2 payload frames. 'numbits' is a number from 0-8,
     controlling the range of padding bytes added to a frame. The actual number
     added is chosen randomly per frame. This applies to HEADERS, DATA and PUSH_PROMISE
     frames equally. The default continues to be 0, e.g. no padding. [Stefan Eissing] 
  
  *) mod_http2: ripping out all the h2_req_engine internal features now that mod_proxy_http2
     has no more need for it. Optional functions are still declared but no longer implemented.
     While previous mod_proxy_http2 will work with this, it is recommeneded to run the matching
     versions of both modules. [Stefan Eissing]
  
  *) mod_proxy_http2: changed mod_proxy_http2 implementation and fixed several bugs which
     resolve PR63170. The proxy module does now a single h2 request on the (reused)
     connection and returns. [Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1854963 13f79535-47bb-0310-9956-ffa450edef68
2019-03-07 09:41:15 +00:00
a721d5cc9e *) mod_http2: Configuration directoves H2Push and H2Upgrade can now be specified per
Location/Directory, e.g. disabling PUSH for a specific set of resources. [Stefan Eissing]

  *) mod_http2: HEAD requests to some module such as mod_cgid caused the stream to
     terminate improperly and cause a HTTP/2 PROTOCOL_ERROR. 
     Fixes <https://github.com/icing/mod_h2/issues/167>. [Michael Kaufmann]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852339 13f79535-47bb-0310-9956-ffa450edef68
2019-01-28 10:27:08 +00:00
eb0fb1c922 On the trunk:
mod_http2: removing comments that documented that greenbytes has untransferable copyright to the sources. The rights, of course, remain unaffected, but maybe some people can sleep better.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821371 13f79535-47bb-0310-9956-ffa450edef68
2018-01-17 14:41:30 +00:00
1693e8678b On the trunk:
mod_http2: Simplify ready queue, less memory and better performance. Update
     mod_http2 version to 1.10.7.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800978 13f79535-47bb-0310-9956-ffa450edef68
2017-07-06 08:15:27 +00:00
7a8fab3a49 On the trunk:
mod_http2: disable and give warning when mpm_prefork is encountered. 
     The server will continue to work, but HTTP/2 will no longer be negotiated.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800689 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 15:44:54 +00:00
f255ac6d7c On the trunk:
mod_http2: MaxKeepAliveRequests now limits the number of times a 
     slave connection gets reused. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791669 13f79535-47bb-0310-9956-ffa450edef68
2017-04-17 09:17:55 +00:00
e4611af52b On the trunk:
mod_http2: less and more granular mutex use for improved performance.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1790284 13f79535-47bb-0310-9956-ffa450edef68
2017-04-05 14:49:25 +00:00
5440a7562b On the trunk:
mod_http2: move stuff from master connection to worker threads, increase spare slave connections, create output beams in worker when needed.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789535 13f79535-47bb-0310-9956-ffa450edef68
2017-03-30 16:05:06 +00:00
0dc4a16fa3 On the trunk:
mod_http2: better performance, eliminated need for nested locks and thread privates.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789395 13f79535-47bb-0310-9956-ffa450edef68
2017-03-29 17:36:35 +00:00
f56c4d6254 On the trunk:
mod_http2: h2 workers with improved scalability for better scheduling
     performance. There are H2MaxWorkers threads created at start and the
     number is kept constant. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788672 13f79535-47bb-0310-9956-ffa450edef68
2017-03-25 16:07:30 +00:00
d645af686d On the trunk:
mod_http2: ripped out H2SessionExtraFiles directive, removed super special sender pool handling in bucket beams.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1787604 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 10:31:48 +00:00
c623d0aead On the trunk:
*) mod_http2: stream timeouts now change to vhost values once the request
     is parsed and processing starts. Initial values are taken from base
     server or SNI host as before. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1785683 13f79535-47bb-0310-9956-ffa450edef68
2017-03-06 16:36:41 +00:00
c56a024e70 On the trunk:
mod_http2: removing extra mutex for h2 apr_allocators again.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783912 13f79535-47bb-0310-9956-ffa450edef68
2017-02-21 17:18:27 +00:00
ba655809af On the trunk:
mod_http2: rework of stream states and cleanup handling.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782875 13f79535-47bb-0310-9956-ffa450edef68
2017-02-13 21:00:30 +00:00
728b6cde48 On the trunk:
*) mod_http2: streaming of request output now reacts timely to data
     from other streams becoming available. Same for new incoming requests.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777907 13f79535-47bb-0310-9956-ffa450edef68
2017-01-08 20:11:27 +00:00
29d1681025 mod_http2: proper parsing and forwarding of multiple or unnaounce 1xx responses
mod_proxy_http2: improved robustness when main connection gets aborted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1767553 13f79535-47bb-0310-9956-ffa450edef68
2016-11-01 19:40:37 +00:00
673349a575 mod_http2: using int queue instead of ihash for stream output event handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1767180 13f79535-47bb-0310-9956-ffa450edef68
2016-10-30 20:38:50 +00:00
0da36a75f8 mod_http2: reverting int->apr_uint32_t changes of v1.7.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1764005 13f79535-47bb-0310-9956-ffa450edef68
2016-10-09 20:22:40 +00:00
2d12cf2d7a various fixes, mod_cgid interop, response/trailer forwarding rewritten, stability
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1763158 13f79535-47bb-0310-9956-ffa450edef68
2016-10-03 11:47:45 +00:00
9b087848c1 more apr_uint32_t usage where appropriate, signed/unsigned warning detox, stream reset clears buffers immediately
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1761548 13f79535-47bb-0310-9956-ffa450edef68
2016-09-20 10:12:22 +00:00
e2a74327fd mod_http2: rest of the fix for output blockage
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1761477 13f79535-47bb-0310-9956-ffa450edef68
2016-09-19 16:21:42 +00:00
d6cd77eb95 mod_http2: complete implemenmtation of draft-http2-debug-state
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754534 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 15:12:38 +00:00
fb0a918862 mod_proxy_http2: own h2_proxy_util.c source file to avoid duplicate use of h2_util.c, updated dsp and cmake as well as configure files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747550 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 14:03:07 +00:00
afe05a61a2 Fix some obvious doxygen warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1746183 13f79535-47bb-0310-9956-ffa450edef68
2016-05-30 19:56:14 +00:00
0be1302714 mod_http2: improved resume/response/window update handling on master connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744712 13f79535-47bb-0310-9956-ffa450edef68
2016-05-20 11:18:37 +00:00
b9eb3fa8b3 mod_http2: checking configured Limit* values against header fields
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744283 13f79535-47bb-0310-9956-ffa450edef68
2016-05-17 14:33:15 +00:00
79804c035b mod_http2: some more cleanup on stream/task/session takedowns
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1741648 13f79535-47bb-0310-9956-ffa450edef68
2016-04-29 15:21:21 +00:00
ed7fa29baa mod_http2: removing beam mutex when task worker done
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1741268 13f79535-47bb-0310-9956-ffa450edef68
2016-04-27 14:01:12 +00:00
afd1183937 mod_http2: elimination of h2_io intermediate stream instances
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740155 13f79535-47bb-0310-9956-ffa450edef68
2016-04-20 15:17:38 +00:00
52cdae53be mod_http2: new bucket beams for tranporting buckets across threads without buffer copy. Code cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739303 13f79535-47bb-0310-9956-ffa450edef68
2016-04-15 13:50:46 +00:00