mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Fix missing Upgrade headers on OPTION * requests, PR58688
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1717816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -246,6 +246,17 @@ int ssl_hook_ReadReq(request_rec *r)
|
|||||||
sslconn = myConnConfig(r->connection->master);
|
sslconn = myConnConfig(r->connection->master);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If "SSLEngine optional" is configured, this is not an SSL
|
||||||
|
* connection, and this isn't a subrequest, send an Upgrade
|
||||||
|
* response header. Note this must happen before map_to_storage
|
||||||
|
* and OPTIONS * request processing is completed.
|
||||||
|
*/
|
||||||
|
if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl)
|
||||||
|
&& !r->main) {
|
||||||
|
apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
|
||||||
|
apr_table_mergen(r->headers_out, "Connection", "upgrade");
|
||||||
|
}
|
||||||
|
|
||||||
if (!sslconn) {
|
if (!sslconn) {
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
}
|
}
|
||||||
@@ -1334,15 +1345,6 @@ int ssl_hook_Fixup(request_rec *r)
|
|||||||
SSL *ssl;
|
SSL *ssl;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* If "SSLEngine optional" is configured, this is not an SSL
|
|
||||||
* connection, and this isn't a subrequest, send an Upgrade
|
|
||||||
* response header. */
|
|
||||||
if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl)
|
|
||||||
&& !r->main) {
|
|
||||||
apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
|
|
||||||
apr_table_mergen(r->headers_out, "Connection", "upgrade");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sslconn && sslconn->ssl) && r->connection->master) {
|
if (!(sslconn && sslconn->ssl) && r->connection->master) {
|
||||||
sslconn = myConnConfig(r->connection->master);
|
sslconn = myConnConfig(r->connection->master);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user