1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

50 Commits

Author SHA1 Message Date
Stefan Eissing
3ed9d65b05 *) 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
2023-06-20 12:01:09 +00:00
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
b737bb8468 *) mod_http2: using new session ids also in logging for connection
contexts and bucket beams.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900031 13f79535-47bb-0310-9956-ffa450edef68
2022-04-19 10:36:53 +00:00
Stefan Eissing
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
Stefan Eissing
5b44e01136 *) mod_http2: small improvements from the http1-separation
branch that apply in general.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899107 13f79535-47bb-0310-9956-ffa450edef68
2022-03-21 09:54:41 +00:00
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
5057dc6a8e * mod_http2: when a server is restarted gracefully, any idle h2 worker
threads are shut down immediately. [Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893214 13f79535-47bb-0310-9956-ffa450edef68
2021-09-10 08:14:48 +00:00
Yann Ylavic
6697a018b2 mod_proxy_http2: follow up to r1883704.
For event/worker MPMs, pchild uses pconf's allocator, so its is NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883707 13f79535-47bb-0310-9956-ffa450edef68
2020-11-22 00:56:07 +00:00
Yann Ylavic
c49dadf6a2 mod_proxy_http2: thread safety with MPM prefork, still..
The allocator of pchild has no mutex with MPM prefork, but we need one
for h2 workers threads synchronization.

Even though mod_http2 shouldn't be used with prefork, better be safe than
sorry, so forcibly set the mutex in h2_child_init() if it doesn't exist.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883704 13f79535-47bb-0310-9956-ffa450edef68
2020-11-21 23:23:04 +00:00
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
67ff312994 mod_http2: bringing some signed/unsigned casting goodness, aligning with github mod-h2 again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1843424 13f79535-47bb-0310-9956-ffa450edef68
2018-10-10 11:22:53 +00:00
Christophe Jaillet
e87ee7939e Remove some trailing spaces to synch trunk with 2.4
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833941 13f79535-47bb-0310-9956-ffa450edef68
2018-06-20 19:45:32 +00:00
Yann Ylavic
30dfcf3241 mod_proxy: follow up to r1822849.
Get the help(er) of mod_http2 to determine how much connections should
be handled in the reslist by default (i.e. max_threads).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822878 13f79535-47bb-0310-9956-ffa450edef68
2018-02-01 14:42:07 +00:00
Stefan Eissing
4f9b578980 mod_http2/mod_proxy_http2: add new module flags
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822503 13f79535-47bb-0310-9956-ffa450edef68
2018-01-29 13:10:22 +00:00
Stefan Eissing
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
Jim Jagielski
1aa89da70c correct copyright/license headers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818306 13f79535-47bb-0310-9956-ffa450edef68
2017-12-15 17:10:14 +00:00
Stefan Eissing
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
Stefan Eissing
faa662844f On the trunk:
mod_http2: checking for required nghttp2 features to enabled dynamic input window resizing for streams (nghttp2 >= v1.5.0). Reporting as feature DWINS on startup.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789279 13f79535-47bb-0310-9956-ffa450edef68
2017-03-29 07:04:07 +00:00
Stefan Eissing
d300afee34 mod_http2: H2PushResource directive for early pushing
mod_proxy_http2: Link header uris are reverse mapped


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769550 13f79535-47bb-0310-9956-ffa450edef68
2016-11-13 21:30:40 +00:00
Stefan Eissing
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
Stefan Eissing
fc770710e1 mod_http2/mod_proxy_http2: proper 100-continue handling up to backend, more robustness on connection reuse with PING frames
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1765318 13f79535-47bb-0310-9956-ffa450edef68
2016-10-17 15:52:01 +00:00
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
aec10f23cc mod_http2: using invalid header callback from nghttp2 1.14.0 onwards
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1758003 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 12:07:16 +00:00
Stefan Eissing
0f02a22dd3 mod_http2: new H2CopyFiles directive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753498 13f79535-47bb-0310-9956-ffa450edef68
2016-07-20 13:04:57 +00:00
Stefan Eissing
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
Stefan Eissing
42cc4efc74 mod_http2: new vars, keepalive increase, no slave reuse when con->keepalive not set properly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1737125 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 15:35:58 +00:00
Stefan Eissing
ba1fbba024 mod_http2: fix for bucket lifetime on master conn, mod_proxy_http2: flow control from front- to backend h2 connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735230 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 14:01:53 +00:00
Stefan Eissing
28777fa091 mod_proxy_http2: stability improvements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734097 13f79535-47bb-0310-9956-ffa450edef68
2016-03-08 14:22:34 +00:00
Stefan Eissing
ebd03293e6 mod_http2: support for several different request engines per connection, fixes CVE-2016-1546
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733727 13f79535-47bb-0310-9956-ffa450edef68
2016-03-05 15:45:12 +00:00
Stefan Eissing
43267df5fe using proxy http2 connection concurrently, if main connection also uses http/2, needs more hardening
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1731096 13f79535-47bb-0310-9956-ffa450edef68
2016-02-18 17:02:02 +00:00
Stefan Eissing
59e3a15e40 fix segfault when not identifying mpm module, added detection for winnt, simeple, motorz and netware
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730798 13f79535-47bb-0310-9956-ffa450edef68
2016-02-17 09:04:12 +00:00
Stefan Eissing
457462dfdd first working h2 request engine implementation that does serial processing of proxy requests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730572 13f79535-47bb-0310-9956-ffa450edef68
2016-02-15 17:10:54 +00:00
Stefan Eissing
3567f9f7c6 new experimental http2 proxy module for h2: and h2c: proxy urls
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729209 13f79535-47bb-0310-9956-ffa450edef68
2016-02-08 16:53:45 +00:00
Stefan Eissing
736f2fce8e using keepalive timeout only when no streams are open, changing from seconds to proper apr_interval_time_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1727594 13f79535-47bb-0310-9956-ffa450edef68
2016-01-29 14:37:17 +00:00
Stefan Eissing
44026b36fa expr support for HTTP2 variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726167 13f79535-47bb-0310-9956-ffa450edef68
2016-01-22 10:09:28 +00:00
Stefan Eissing
ff2c0232f8 bytes read/written on slave connections are reported to mod_logio, fixes PR 58871
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725496 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:42:34 +00:00
Rainer Jung
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
Stefan Eissing
17282190d0 mod_http2: push diary to avoid duplicate pushes, cache-digest handling, http2-status handler for stats about current http2 connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724820 13f79535-47bb-0310-9956-ffa450edef68
2016-01-15 14:27:59 +00:00
Stefan Eissing
93c609224e fixed segfault in connection shutdown, added accept-push-policy support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721547 13f79535-47bb-0310-9956-ffa450edef68
2015-12-23 14:50:54 +00:00
Stefan Eissing
b5bc085281 cleanup of DEBUG log level to who all frame types receveid and sent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721204 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 16:02:32 +00:00
Stefan Eissing
945b6be856 gack, c99 mode stroke again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721190 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 15:20:55 +00:00
Stefan Eissing
b422d0da0f gack, c99 mode stroke again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721189 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 15:20:20 +00:00
Stefan Eissing
f650f5c942 subprocess_env vars HTTP2 and H2PUSH supported, export of mod_http2.h with OPTIONALs for others to directly look these up, similar to mod_ssl
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721150 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 13:32:20 +00:00
Jim Jagielski
df0a03587e bye bye mod_h2, hello mod_http2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705749 13f79535-47bb-0310-9956-ffa450edef68
2015-09-28 19:26:32 +00:00