Skip to content

Commit

Permalink
Merge branch 'apache:trunk' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
samkenxstream authored Jul 6, 2023
2 parents 512b118 + a4255be commit 5de7c50
Show file tree
Hide file tree
Showing 72 changed files with 3,623 additions and 516 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
# -------------------------------------------------------------------------
- name: HTTP/2 test suite
config: --enable-mods-shared=reallyall --with-mpm=event --enable-mpms-shared=all
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart python3-filelock python3-websockets
env: |
APR_VERSION=1.7.4
APU_VERSION=1.6.3
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
### TODO: fix caching here.
- name: MOD_TLS test suite
config: --enable-mods-shared=reallyall --with-mpm=event --enable-mpms-shared=event
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart cargo cbindgen
pkgs: curl python3-pytest nghttp2-client python3-cryptography python3-requests python3-multipart python3-filelock python3-websockets cargo cbindgen
env: |
APR_VERSION=1.7.4
APU_VERSION=1.6.3
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ SET(mod_http2_extra_sources
modules/http2/h2_request.c modules/http2/h2_session.c
modules/http2/h2_stream.c modules/http2/h2_switch.c
modules/http2/h2_util.c modules/http2/h2_workers.c
modules/http2/h2_ws.c
)
SET(mod_ldap_extra_defines LDAP_DECLARE_EXPORT)
SET(mod_ldap_extra_libs wldap32)
Expand Down Expand Up @@ -966,7 +967,7 @@ IF(OPENSSL_FOUND)
SET_TARGET_PROPERTIES(abs PROPERTIES INCLUDE_DIRECTORIES "${tmp_includes}")
DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "Apache HTTP Server ab/SSL program")
SET_TARGET_PROPERTIES(abs PROPERTIES COMPILE_FLAGS "-DAPP_FILE ${define_long_name} -DBIN_NAME=abs.exe ${EXTRA_COMPILE_FLAGS}")
TARGET_LINK_LIBRARIES(abs ${EXTRA_LIBS} ${APR_LIBRARIES} ${OPENSSL_LIBRARIES})
TARGET_LINK_LIBRARIES(abs ${EXTRA_LIBS} ${APR_LIBRARIES} ${OPENSSL_LIBRARIES} Ws2_32.lib)
ENDIF()
GET_PROPERTY(tmp_includes TARGET ab PROPERTY INCLUDE_DIRECTORIES)

Expand Down
4 changes: 4 additions & 0 deletions changes-entries/h2_flush_fix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*) 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.
[Stefan Eissing]
6 changes: 6 additions & 0 deletions changes-entries/h2_pr66646.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*) mod_http2: 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.
[Stefan Eissing]
6 changes: 6 additions & 0 deletions changes-entries/h2_proxyrequests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*) 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.
[Stefan Eissing]
10 changes: 10 additions & 0 deletions changes-entries/h2_websockets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*) 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.
[Stefan Eissing]
3 changes: 3 additions & 0 deletions changes-entries/pr66672.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*) mod_rewrite: Fix a recent regression where a rule with both a trailing
'?' and the [QSA] flag did not have the query appended. PR66672
Frank Meier <frank.meier ergon.ch>
1 change: 1 addition & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ APACHE_FAST_OUTPUT(support/Makefile)
if test -d ./test; then
APACHE_FAST_OUTPUT(test/Makefile)
AC_CONFIG_FILES([test/pyhttpd/config.ini])
APACHE_FAST_OUTPUT(test/clients/Makefile)
fi

dnl ## Finalize the variables
Expand Down
2 changes: 1 addition & 1 deletion docs/log-message-tags/next-number
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10456
10473
2 changes: 2 additions & 0 deletions docs/manual/mod/directives.html.fr.utf8
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
<li><a href="mod_http2.html#h2moderntlsonly">H2ModernTLSOnly</a></li>
<li><a href="mod_http2.html#h2outputbuffering">H2OutputBuffering</a></li>
<li><a href="mod_http2.html#h2padding">H2Padding</a></li>
<li><a href="mod_http2.html#h2proxyrequests">H2ProxyRequests</a></li>
<li><a href="mod_http2.html#h2push">H2Push</a></li>
<li><a href="mod_http2.html#h2pushdiarysize">H2PushDiarySize</a></li>
<li><a href="mod_http2.html#h2pushpriority">H2PushPriority</a></li>
Expand All @@ -357,6 +358,7 @@
<li><a href="mod_http2.html#h2tlscooldownsecs">H2TLSCoolDownSecs</a></li>
<li><a href="mod_http2.html#h2tlswarmupsize">H2TLSWarmUpSize</a></li>
<li><a href="mod_http2.html#h2upgrade">H2Upgrade</a></li>
<li><a href="mod_http2.html#h2websockets">H2WebSockets</a></li>
<li><a href="mod_http2.html#h2windowsize">H2WindowSize</a></li>
<li><a href="mod_headers.html#header">Header</a></li>
<li><a href="mod_autoindex.html#headername">HeaderName</a></li>
Expand Down
66 changes: 66 additions & 0 deletions docs/manual/mod/mod_http2.html.fr.utf8
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
<li><img alt="" src="../images/down.gif" /> <a href="#h2moderntlsonly">H2ModernTLSOnly</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2outputbuffering">H2OutputBuffering</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2padding">H2Padding</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2proxyrequests">H2ProxyRequests</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2push">H2Push</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2pushdiarysize">H2PushDiarySize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2pushpriority">H2PushPriority</a></li>
Expand All @@ -104,6 +105,7 @@
<li><img alt="" src="../images/down.gif" /> <a href="#h2tlscooldownsecs">H2TLSCoolDownSecs</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2tlswarmupsize">H2TLSWarmUpSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2upgrade">H2Upgrade</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2websockets">H2WebSockets</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#h2windowsize">H2WindowSize</a></li>
</ul>
<h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component=mod_http2">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component=mod_http2">Signaler un bug</a></li></ul><h3>Voir aussi</h3>
Expand Down Expand Up @@ -622,6 +624,30 @@
provenir d'un client dont l'implémentation comporte des erreurs.
</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="h2proxyrequests" id="h2proxyrequests">Directive</a> <a name="H2ProxyRequests" id="H2ProxyRequests">H2ProxyRequests</a> <a title="Lien permanent" href="#h2proxyrequests" class="permalink">&para;</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active/Désactive les requêtes sous mandat direct via HTTP/2</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>H2ProxyRequests on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>H2ProxyRequests off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr>
<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.5.1 du serveur HTTP
Apache</td></tr>
</table>
<p>
La directive <code class="directive">H2ProxyRequests</code> permet
d'activer ou de désactiver la gestion des requêtes HTTP/2 dans
un contexte de mandat direct.
</p><p>
Similaire à <code class="directive"><a href="../mod/proxy.html#proxyrequests">ProxyRequests</a></code>,
cette directive déclenche le traitement nécessaire des requêtes
lorsque HTTP/2 est activé dans un contexte de mandat direct.
</p><p>
</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="h2push" id="h2push">Directive</a> <a name="H2Push" id="H2Push">H2Push</a> <a title="Lien permanent" href="#h2push" class="permalink">&para;</a></h2>
Expand Down Expand Up @@ -1122,6 +1148,46 @@ H2PushPriority text/css interleaved # poids de 256 par défaut</pre>
<div class="example"><h3>Exemple</h3><pre class="prettyprint lang-config">H2Upgrade on</pre>
</div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="h2websockets" id="h2websockets">Directive</a> <a name="H2WebSockets" id="H2WebSockets">H2WebSockets</a> <a title="Lien permanent" href="#h2websockets" class="permalink">&para;</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active/désactive les WebSockets via HTTP/2</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>H2WebSockets on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>H2WebSockets off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr>
<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.5.1 du serveur HTTP
Apache</td></tr>
</table>
<p>
La directive <code class="directive">H2WebSockets</code> permet
d'activer ou de désactiver l'amorçage des WebSockets via le
protocole HTTP/2. Cette extension du protocole est définie dans
la RFC 8441.
</p><p>
Ces requêtes sont similaires à CONNECT, mais elles possèdent
l'en-tête supplémentaire ':protocol'. Elles sont transformées au
sein du module en leurs équivalents HTTP/1.1 avant d'être
soumises au traitement interne.
</p><p>
Cela signifie que les WebSockets HTTP/2 peuvent être utilisés
dans le cadre d'une directive <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code> avec le paramètre
'upgrade=websocket' sans autres modifications.
</p><p>
Pour les modules tiers qui gèrent les WebSockets directement
dans le serveur, l'amorçage du protocole lui-même fonctionnera
aussi. Dans le cas de HTTP/2 cependant, le transfert de données
nécessite une prise en charge supplémentaire. Le WebSocket
négocié sera incapable d'utiliser le socket de connexion du
client pour examiner les évènements d'entrée/sortie concernés.
</p><p>
Cette fonctionnalité étant susceptible de briser la
compatibilité ascendante pour de tels modules tiers, elle n'est
pas activée par défaut.
</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="h2windowsize" id="h2windowsize">Directive</a> <a name="H2WindowSize" id="H2WindowSize">H2WindowSize</a> <a title="Lien permanent" href="#h2windowsize" class="permalink">&para;</a></h2>
Expand Down
62 changes: 62 additions & 0 deletions docs/manual/mod/mod_http2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1082,4 +1082,66 @@ H2EarlyHint Link "&lt;/my.css&gt;;rel=preload;as=style"
</usage>
</directivesynopsis>

<directivesynopsis>
<name>H2WebSockets</name>
<description>En-/Disable WebSockets via HTTP/2</description>
<syntax>H2WebSockets on|off</syntax>
<default>H2WebSockets off</default>
<contextlist>
<context>server config</context>
<context>virtual host</context>
</contextlist>
<compatibility>Available in version 2.5.1 and later.</compatibility>

<usage>
<p>
Use <directive>H2WebSockets</directive> to enable or disable
bootstrapping of WebSockets via the HTTP/2 protocol. This
protocol extension is defined in RFC 8441.
</p><p>
Such requests come as a CONNECT with an extra ':protocol'
header. Such requests are transformed inside the module to
their HTTP/1.1 equivalents before passing it to internal
processing.
</p><p>
This means that HTTP/2 WebSockets can be used for a
<directive module="mod_proxy">ProxyPass</directive> with
'upgrade=websocket' parameter without further changes.
</p><p>
For (3rd party) modules that handle WebSockets directly in the
server, the protocol bootstrapping itself will also work. However
the transfer of data does require extra support in case of HTTP/2.
The negotiated WebSocket will not be able to use the client connection
socket for polling IO related events.
</p><p>
Because enabling this feature might break backward compatibility
for such 3rd party modules, it is not enabled by default.
</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>H2ProxyRequests</name>
<description>En-/Disable forward proxy requests via HTTP/2</description>
<syntax>H2ProxyRequests on|off</syntax>
<default>H2ProxyRequests off</default>
<contextlist>
<context>server config</context>
<context>virtual host</context>
</contextlist>
<compatibility>Available in version 2.5.1 and later.</compatibility>

<usage>
<p>
Use <directive>H2ProxyRequests</directive> to enable or disable
handling of HTTP/2 requests in a forward proxy configuration.
</p><p>
Similar to <directive module="proxy">ProxyRequests</directive>, this
triggers the needed treatment of requests when HTTP/2 is enabled
in a forward proxy configuration. Both directive should be enabled.
</p><p>
</p>
</usage>
</directivesynopsis>

</modulesynopsis>
71 changes: 70 additions & 1 deletion docs/manual/mod/mod_http2.xml.fr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
<!-- English Revision: 1909769 -->
<!-- English Revision: 1910656 -->
<!-- French translation : Lucien GENTIS -->

<!--
Expand Down Expand Up @@ -1244,4 +1244,73 @@ H2EarlyHint Link "&lt;/my.css&gt;;rel=preload;as=style"
</usage>
</directivesynopsis>

<directivesynopsis>
<name>H2WebSockets</name>
<description>Active/désactive les WebSockets via HTTP/2</description>
<syntax>H2WebSockets on|off</syntax>
<default>H2WebSockets off</default>
<contextlist>
<context>server config</context>
<context>virtual host</context>
</contextlist>
<compatibility>Disponible à partir de la version 2.5.1 du serveur HTTP
Apache</compatibility>

<usage>
<p>
La directive <directive>H2WebSockets</directive> permet
d'activer ou de désactiver l'amorçage des WebSockets via le
protocole HTTP/2. Cette extension du protocole est définie dans
la RFC 8441.
</p><p>
Ces requêtes sont similaires à CONNECT, mais elles possèdent
l'en-tête supplémentaire ':protocol'. Elles sont transformées au
sein du module en leurs équivalents HTTP/1.1 avant d'être
soumises au traitement interne.
</p><p>
Cela signifie que les WebSockets HTTP/2 peuvent être utilisés
dans le cadre d'une directive <directive
module="mod_proxy">ProxyPass</directive> avec le paramètre
'upgrade=websocket' sans autres modifications.
</p><p>
Pour les modules tiers qui gèrent les WebSockets directement
dans le serveur, l'amorçage du protocole lui-même fonctionnera
aussi. Dans le cas de HTTP/2 cependant, le transfert de données
nécessite une prise en charge supplémentaire. Le WebSocket
négocié sera incapable d'utiliser le socket de connexion du
client pour examiner les évènements d'entrée/sortie concernés.
</p><p>
Cette fonctionnalité étant susceptible de briser la
compatibilité ascendante pour de tels modules tiers, elle n'est
pas activée par défaut.
</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>H2ProxyRequests</name>
<description>Active/Désactive les requêtes sous mandat direct via HTTP/2</description>
<syntax>H2ProxyRequests on|off</syntax>
<default>H2ProxyRequests off</default>
<contextlist>
<context>server config</context>
<context>virtual host</context>
</contextlist>
<compatibility>Disponible à partir de la version 2.5.1 du serveur HTTP
Apache</compatibility>

<usage>
<p>
La directive <directive>H2ProxyRequests</directive> permet
d'activer ou de désactiver la gestion des requêtes HTTP/2 dans
un contexte de mandat direct.
</p><p>
Similaire à <directive module="proxy">ProxyRequests</directive>,
cette directive déclenche le traitement nécessaire des requêtes
lorsque HTTP/2 est activé dans un contexte de mandat direct.
</p><p>
</p>
</usage>
</directivesynopsis>

</modulesynopsis>
2 changes: 1 addition & 1 deletion docs/manual/mod/mod_proxy.html.fr.utf8
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ ProxyPass "/mirror/foo" "http://backend.example.com"</pre>
</td></tr>
<tr><td>timeout</td>
<td><code class="directive"><a href="#proxytimeout">ProxyTimeout</a></code></td>
<td>Délai d'attente de la connexion en secondes. Le nombre de
<td>Délai d'attente du socket en secondes. Le nombre de
secondes pendant lesquelles Apache httpd attend l'envoi de
données vers le serveur d'arrière-plan. Utilise la syntaxe <a href="directive-dict.html#Syntax">time-interval</a>.
</td></tr>
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/mod/mod_proxy.xml.fr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
<!-- English Revision: 1907045 -->
<!-- English Revision: 1910253 -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->

Expand Down Expand Up @@ -1436,7 +1436,7 @@ ProxyPass "/mirror/foo/i" "!"
</td></tr>
<tr><td>timeout</td>
<td><directive module="mod_proxy">ProxyTimeout</directive></td>
<td>Délai d'attente de la connexion en secondes. Le nombre de
<td>Délai d'attente du socket en secondes. Le nombre de
secondes pendant lesquelles Apache httpd attend l'envoi de
données vers le serveur d'arrière-plan. Utilise la syntaxe <a
href="directive-dict.html#Syntax">time-interval</a>.
Expand Down
Loading

0 comments on commit 5de7c50

Please sign in to comment.