1
0
mirror of https://github.com/apache/httpd.git synced 2025-09-13 22:01:52 +03:00

71 Commits

Author SHA1 Message Date
Stefan Eissing
149f6c72d3 *) mod_http2: update to version 2.0.35
New directive `H2MaxStreamErrors` to control how much bad behaviour
     by clients is tolerated before the connection is closed.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927792 13f79535-47bb-0310-9956-ffa450edef68
2025-08-14 07:53:10 +00:00
Stefan Eissing
e1fe1d8505 *) mod_md: update to version 2.0.30
- Fixed bug in handling over long response headers. When the 64 KB limit
       of nghttp2 was exceeded, the request was not reset and the client was
       left hanging, waiting for it. Now the stream is reset.
     - Added new directive `H2MaxHeaderBlockLen` to set the limit on response
       header sizes.
     - Fixed handling of Timeout vs. KeepAliveTimeout when first request on a
       connection was reset.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924145 13f79535-47bb-0310-9956-ffa450edef68
2025-03-03 12:32:31 +00:00
Stefan Eissing
8595a9c910 Fix missing break in config settings, code style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911961 13f79535-47bb-0310-9956-ffa450edef68
2023-08-28 08:33:22 +00:00
Stefan Eissing
77ae6da62c *) 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
2023-06-28 11:22:49 +00:00
Stefan Eissing
ac9f458776 *) 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
2023-06-21 12:14:08 +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
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
Stefan Eissing
ff6b8026ac *) 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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907697 13f79535-47bb-0310-9956-ffa450edef68
2023-02-16 11:58:45 +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
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
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
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
309e083893 mod_htt2, synch with changes from github module version:
- logio: improvements to reporting of sent bytes for http2 responses
  - directive H2OutputBuffering, controls if any output should be sent immediately.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1886792 13f79535-47bb-0310-9956-ffa450edef68
2021-02-22 14:11:09 +00:00
Stefan Eissing
dd8ba20047 *) mod_http2: Fixed interaction with mod_reqtimeout. A loaded mod_http2 was disabling the
ssl handshake timeouts. Also, fixed a mistake of the last version that made `H2Direct` 
     always `on`, irregardless of configuration. Found and reported by
     <Armin.Abfalterer@united-security-providers.ch> and
     <Marcial.Rion@united-security-providers.ch>. [Stefan Eissing] 

  *) mod_http2: Multiple field length violations in the same request no longer cause
     several log entries to be written. [@mkauf]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870454 13f79535-47bb-0310-9956-ffa450edef68
2019-11-26 09:36:28 +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
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
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
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
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
Stefan Eissing
b633809d19 On the trunk:
*) mod_http2: rework of stream resource cleanup to avoid a crash in a close
     of a lingering connection. Prohibit special file bucket beaming for
     shared buckets. Files sent in stream output now use the stream pool
     as read buffer, reducing memory footprint of connections.
     [Yann Ylavic, Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1779738 13f79535-47bb-0310-9956-ffa450edef68
2017-01-21 15:07:42 +00:00
Jim Jagielski
cc97ce3e52 https://bz.apache.org/bugzilla/show_bug.cgi?id=58855
Optimize check for empty strings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778067 13f79535-47bb-0310-9956-ffa450edef68
2017-01-09 22:08:01 +00:00
Stefan Eissing
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
Stefan Eissing
85900b7fd8 On the trunk:
mod_http2: adding support for MergeTrailers directive. 
 
mod_http2: limiting DATA frame sizes by TLS record sizes in use on the     
     connection. Flushing outgoing frames earlier. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776735 13f79535-47bb-0310-9956-ffa450edef68
2016-12-31 13:11:59 +00:00
Stefan Eissing
fcdeaaec90 mod_http2: new directove H2EarlyPushes for enabled 103 interim responses
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1771015 13f79535-47bb-0310-9956-ffa450edef68
2016-11-23 18:13:06 +00:00
Stefan Eissing
4ee8988275 mod_http2: fixes for compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769600 13f79535-47bb-0310-9956-ffa450edef68
2016-11-14 11:38:59 +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
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
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
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
c80274fdca removed experimental++ H2* timeout directives, instead using normal Timeout and KeepAliveTimeout only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1727590 13f79535-47bb-0310-9956-ffa450edef68
2016-01-29 14:17:12 +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
d3d3c379b7 push diary work, introduction of N/P for cache digest handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724206 13f79535-47bb-0310-9956-ffa450edef68
2016-01-12 11:20:54 +00:00
Stefan Eissing
cb8084064d new directive H2PushDiarySize, first simple apr_hash implementation of a push diary that prevents duplicate pushes on a connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724086 13f79535-47bb-0310-9956-ffa450edef68
2016-01-11 17:12:24 +00:00
Stefan Eissing
b93c96a6ba dynamic allocation of transfer file handles used to pass buckets to master connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723069 13f79535-47bb-0310-9956-ffa450edef68
2016-01-05 13:25:48 +00:00
Stefan Eissing
f23707fedf reworked synching of session shutdown with worker threads, workers now stick to a session until no more reuqquest are tbd, keepalive handling revisited
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722899 13f79535-47bb-0310-9956-ffa450edef68
2016-01-04 15:30:36 +00:00
Stefan Eissing
105d3ff9d1 fixes after fuzzing tests, changed H2KeepAliveTimeout default
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722369 13f79535-47bb-0310-9956-ffa450edef68
2015-12-30 16:12:35 +00:00
Stefan Eissing
7d209de21f rewrote http2 connection state handling, fixed keepalive timeout handling for async and sync MPMs, cleaned logging, improved scoreboard updates of http2 master connections
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721417 13f79535-47bb-0310-9956-ffa450edef68
2015-12-22 15:52:10 +00:00
Stefan Eissing
38b7bdfb85 when normal read timeout expires, http2 switches to its keepalive timeout, on async mpms, connection resumes processing back to mpm
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721187 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 15:18:43 +00:00
Stefan Eissing
42891fce56 3 new timeout configuration directives for mod_http2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1720801 13f79535-47bb-0310-9956-ffa450edef68
2015-12-18 14:45:18 +00:00
Stefan Eissing
30d7e90c9f correcting error messages, better str concat, provided by CJ
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1720501 13f79535-47bb-0310-9956-ffa450edef68
2015-12-17 10:01:26 +00:00
Stefan Eissing
5286b9bcaa mod_http2: returning idle connections back to the mpm in case of async mpm enabled
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1720172 13f79535-47bb-0310-9956-ffa450edef68
2015-12-15 14:25:43 +00:00
Stefan Eissing
e367ad643b saving some bytes and cycles by not create h2_ctx for every connection and checking for c->master in the hooks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719881 13f79535-47bb-0310-9956-ffa450edef68
2015-12-14 11:09:31 +00:00
Stefan Eissing
d093f82cee removing weight from H2PushPriority with dependency 'before' as on stream close, priorities would not be as before otherwise
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1718400 13f79535-47bb-0310-9956-ffa450edef68
2015-12-07 15:22:11 +00:00
Stefan Eissing
6b3dc90629 adding include for older apr versions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716487 13f79535-47bb-0310-9956-ffa450edef68
2015-11-25 17:02:11 +00:00
Stefan Eissing
ef14549031 new directive H2PushPriority to define content-type based priorities on server pushed resources
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716388 13f79535-47bb-0310-9956-ffa450edef68
2015-11-25 13:26:31 +00:00
Stefan Eissing
1497a89530 fixes races during session shutdown when connection is aborted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715833 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 14:30:07 +00:00