With the current implementation, that seems wise. This restriction can be removed once the change we discussed with output filter/hook is working.
> Am 08.12.2015 um 14:37 schrieb Yann Ylavic <[email protected]>: > > On Tue, Dec 8, 2015 at 2:30 PM, <[email protected]> wrote: >> Author: ylavic >> Date: Tue Dec 8 13:30:30 2015 >> New Revision: 1718595 >> >> URL: http://svn.apache.org/viewvc?rev=1718595&view=rev >> Log: >> Comment about ap_request_has_body() check for Upgrade. >> >> Modified: >> httpd/httpd/branches/2.4.x/STATUS >> > [] >> trunk patch: http://svn.apache.org/r1717816 >> +1: wrowe, icing >> + ylavic: how about adding !ap_request_has_body(r) to the test then? > > E.g. (on top of r1717816): > > Index: modules/ssl/ssl_engine_kernel.c > =================================================================== > --- modules/ssl/ssl_engine_kernel.c (revision 1718341) > +++ modules/ssl/ssl_engine_kernel.c (working copy) > @@ -252,7 +252,7 @@ int ssl_hook_ReadReq(request_rec *r) > * and OPTIONS * request processing is completed. > */ > if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl) > - && !r->main) { > + && ap_is_initial_req(r) && !ap_has_request_body(r)) { > apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1"); > apr_table_mergen(r->headers_out, "Connection", "upgrade"); > } > --
