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

98 Commits

Author SHA1 Message Date
Stefan Eissing
8e529cecca * mod_http2/mod_proxy_http2: fix a bug in calculating the log2 value of
integers, used in push diaries and proxy window size calculations.
    PR69741 [Benjamin P. Kallus]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927235 13f79535-47bb-0310-9956-ffa450edef68
2025-07-15 06:35:04 +00:00
Eric Covener
a6b8db04ec improve h2 header error handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927038 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:56:48 +00:00
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
8b68438b2e *) mod_http2: field values (headers and trailers) are stripped of
leading/trailing whitespace (space +htab) before being processed
     or send in a response. This is compatible behaviour to HTTP/1.1
     parsers that strip incoming headers of such characters.
     [Stefan Eissing]

  - removed intermittent "H2HeaderStrictness" directive again.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904777 13f79535-47bb-0310-9956-ffa450edef68
2022-10-22 11:41:55 +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
cc77f54228 *) mod_http2: synchronization with github sources.
Building in trunk and against 2.4.x is now supported
     via AP_HAS_RESPONSE_BUCKETS defines.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904305 13f79535-47bb-0310-9956-ffa450edef68
2022-09-27 13:21:21 +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
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
Stefan Eissing
83c32adbe5 *) mod_http2: fix an edge case in h2_fifo_remove,
improve c1 connection flushing, fix an UAF in
     recycling transit pools.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902004 13f79535-47bb-0310-9956-ffa450edef68
2022-06-17 09:06:35 +00:00
Stefan Eissing
cc894406d8 *) mod_http2: remove unused and insecure code. Fixes PR66037.
Thanks to Ronald Crane (Zippenhop LLC) for reporting this.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900356 13f79535-47bb-0310-9956-ffa450edef68
2022-04-28 10:41:48 +00:00
Stefan Eissing
1c1d482472 *) mod_http2: fix edge case in removal of entries
in a h2_fifo.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900102 13f79535-47bb-0310-9956-ffa450edef68
2022-04-21 10:31:37 +00:00
Stefan Eissing
8ce99f9ef1 *) mod_http2: use the new RESPONSE buckets introduced in r1899648.
This replaces the internal H2_HEADERS bucket, removing its
     source file and also obsoletes any interim response parsing
     needs.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899649 13f79535-47bb-0310-9956-ffa450edef68
2022-04-07 10:55:09 +00:00
Stefan Eissing
a457310273 *) mod_http2: fixed a possible concurrency issue with
registering h2_mplx at h2_workers.
     Improved h2_fifo internals efficiency inspired
     by ap_fdqueue.
     Made 711 tests repeatable.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899168 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 09:06:29 +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
Christophe Jaillet
2806f2ab0c Remove trailing space to synch with 2.4.x
[skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891841 13f79535-47bb-0310-9956-ffa450edef68
2021-07-28 06:35:36 +00:00
Stefan Eissing
971fc8f5b5 *) mod_http2:
Fixes <https://github.com/icing/mod_h2/issues/200>: 
     "LimitRequestFields 0" now disables the limit, as documented.
     Fixes <https://github.com/icing/mod_h2/issues/201>: 
     Do not count repeated headers with same name against the field
     count limit. The are merged internally, as if sent in a single HTTP/1 line.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879832 13f79535-47bb-0310-9956-ffa450edef68
2020-07-13 15:36:53 +00:00
Stefan Eissing
9020a5f8a1 *) mod_http2: Fixes issue where mod_unique_id would generate non-unique request
identifier under load, see <https://github.com/icing/mod_h2/issues/195>.
     [Michael Kaufmann, Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874689 13f79535-47bb-0310-9956-ffa450edef68
2020-03-02 10:42:30 +00:00
Mike Rumph
85760859ca Fix spelling errors found by codespell. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
2020-02-13 18:15:57 +00:00
Stefan Eissing
1f4ec799b1 *) mod_http2: Fixed rare cases where a h2 worker could deadlock the main connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1871810 13f79535-47bb-0310-9956-ffa450edef68
2019-12-19 09:39:22 +00:00
Stefan Eissing
96b83022b9 On the trunk:
* silencing gcc uninitialized warning
 * refrainning from apr_table_addn() use since pool debug assumptions are in conflict
 * adding more assertions
 * copy-porting changes to base64 encoding code from mod_md



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1835118 13f79535-47bb-0310-9956-ffa450edef68
2018-07-05 10:21:00 +00:00
Christophe Jaillet
3e56c5b221 Fix some typos reported in PR 59998
Most add already been fixed when PR 59990 had been applied on trunk. 

Thx klemens

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827669 13f79535-47bb-0310-9956-ffa450edef68
2018-03-24 20:05:19 +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
Yann Ylavic
db729c7302 Fix ascii art :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810233 13f79535-47bb-0310-9956-ffa450edef68
2017-09-30 19:28:50 +00:00
Stefan Eissing
a2f0c639f3 bumping version, removing some unused code, fixes in base64url from mod_md
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1804096 13f79535-47bb-0310-9956-ffa450edef68
2017-08-04 11:03:08 +00:00
Stefan Eissing
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
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
013958a3d3 On the trunk:
mod_http2: fixed possible deadlock that could occur when connections were 
     terminated early with ongoing streams. Fixed possible hanger with timeout
     on race when connection considers itself idle.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1792195 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 12:21:31 +00:00
Stefan Eissing
c66d4fc74e On the trunk:
mod_http2: only when 'HttpProtocolOptions Unsafe' is configured, will
     control characters in response headers or trailers be forwarded to the
     client. Otherwise, in the default configuration, a request will eiher 
     fail with status 500 or the stream will be reset by a RST_STREAM frame. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791377 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 15:08:32 +00:00
Stefan Eissing
0e3a0a9314 On the turnk:
mod_http2: fixed two deadlocks introduced by removing nested mplx locking earlier.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1790754 13f79535-47bb-0310-9956-ffa450edef68
2017-04-09 16:42:36 +00:00
Stefan Eissing
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
Stefan Eissing
ac6721eb69 On the trunk:
mod_http2 after review by Christophe:
  * fix h2_fifo_peek to properly block
  * check peek return status while processing mplx queue



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789276 13f79535-47bb-0310-9956-ffa450edef68
2017-03-29 06:31:46 +00:00
Stefan Eissing
ea16c6ebfe On the trunk:
mod_http2: input buffering and dynamic flow windows for increased throughput.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788981 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 16:31:38 +00:00
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
be7367c6af mod_http2: c89 slippage fixed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1767181 13f79535-47bb-0310-9956-ffa450edef68
2016-10-30 20:41:55 +00:00
Stefan Eissing
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
Stefan Eissing
a7719a1eed mod_http2: AP_DEBUG_ASSERT changed to ap_assert
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1766691 13f79535-47bb-0310-9956-ffa450edef68
2016-10-26 15:14:11 +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
b610c3b0e3 mod_proxy_http2: resolving last 2 reported dup symbol clashes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1764255 13f79535-47bb-0310-9956-ffa450edef68
2016-10-11 14:31:31 +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
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
Stefan Eissing
08df710604 mod_http2: more const goodiness and checks on h2 request creation, less NULL checking while processing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1759547 13f79535-47bb-0310-9956-ffa450edef68
2016-09-07 06:44:16 +00:00
Stefan Eissing
8b0d436788 mod_http2: support for intermediate responses
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755323 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 13:48:16 +00:00
Stefan Eissing
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
William A. Rowe Jr
03fdf196c9 The answer to the question appears to be in 2.4.21, drop h2_casecmpstr fork
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747470 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:19:24 +00:00
William A. Rowe Jr
f4cc76ee71 Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:06:42 +00:00
Stefan Eissing
134f867cea mod_http2: fixing re-entrancy problems with new master event dispatching
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744751 13f79535-47bb-0310-9956-ffa450edef68
2016-05-20 14:37:39 +00:00