-*- coding: utf-8 -*-
Changes with Apache 2.4.28
+ *) mod_proxy_wstunnel: Allow upgrade to any protocol dynamically.
+ PR 61142.
+
*) mod_watchdog/mod_proxy_hcheck: Time intervals can now be spefified
down to the millisecond. Supports 'mi' (minute), 'ms' (millisecond),
's' (second) and 'hr' (hour!) time suffixes. [Jim Jagielski]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_proxy_wstunnel fix PR 61142
- 2.4.x patch: svn merge -c 1801594 ^/httpd/httpd/trunk .
- +1: jfclere, jim, covener
- ylavic: CHANGES-log please?
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
<p>In fact the module can be used to upgrade to other protocols, you can set the <code>upgrade</code>
parameter in the <directive type="ProxyPass" module="mod_proxy">ProxyPass</directive>
directive to allow the module to accept other protocol.
-NONE means you bypass the check for the header but still upgrade to WebSocket.</p>
+NONE means you bypass the check for the header but still upgrade to WebSocket.
+ANY means that <code>Upgrade</code> will read in the request headers and use
+in the response <code>Upgrade</code></p>
</summary>
<seealso><module>mod_proxy</module></seealso>
if (ap_cstr_casecmp(upgrade_method, "NONE") == 0) {
buf = apr_pstrdup(p, "Upgrade: WebSocket" CRLF "Connection: Upgrade" CRLF CRLF);
+ } else if (ap_cstr_casecmp(upgrade_method, "ANY") == 0) {
+ const char *upgrade;
+ upgrade = apr_table_get(r->headers_in, "Upgrade");
+ buf = apr_pstrcat(p, "Upgrade: ", upgrade, CRLF "Connection: Upgrade" CRLF CRLF, NULL);
} else {
buf = apr_pstrcat(p, "Upgrade: ", upgrade_method, CRLF "Connection: Upgrade" CRLF CRLF, NULL);
}
if (ap_cstr_casecmp(upgrade_method, "NONE") != 0) {
const char *upgrade;
upgrade = apr_table_get(r->headers_in, "Upgrade");
- if (!upgrade || ap_cstr_casecmp(upgrade, upgrade_method) != 0) {
+ if (!upgrade || (ap_cstr_casecmp(upgrade, upgrade_method) != 0 &&
+ ap_cstr_casecmp(upgrade_method, "ANY") !=0)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02900)
"declining URL %s (not %s, Upgrade: header is %s)",
url, upgrade_method, upgrade ? upgrade : "missing");