1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Files
apache/modules/http2
Yann Ylavic 6044859057 core: Efficient ap_thread_current() when apr_thread_local() is missing.
#define ap_thread_create, ap_thread_current_create and ap_thread_current to
their apr-1.8+ equivalent if available, or implement them using the compiler's
thread_local mechanism if available, or finally provide stubs otherwise.

#define AP_HAS_THREAD_LOCAL to 1 in the two former case or 0 otherwise, while
AP_THREAD_LOCAL is defined to the compiler's keyword iff AP_HAS_THREAD_LOCAL.

Replace all apr_thread_create() calls with ap_thread_create() so that httpd
threads can use ap_thread_current()'s pool data as Thread Local Storage.

Bump MMN minor.

* include/httpd.h():
  Define AP_HAS_THREAD_LOCAL, AP_THREAD_LOCAL (eventually), ap_thread_create(),
  ap_thread_current_create() and ap_thread_current().
  
* server/util.c:
  Implement ap_thread_create(), ap_thread_current_create() and
  ap_thread_current() when APR < 1.8.

* modules/core/mod_watchdog.c, modules/http2/h2_workers.c,
    modules/ssl/mod_ssl_ct.c:
  Use ap_thread_create() instead of apr_thread_create.

* server/main.c:
  Use AP_HAS_THREAD_LOCAL and ap_thread_current_create instead of APR's.

* server/util_pcre.c:
  Use AP_HAS_THREAD_LOCAL and ap_thread_current instead of APR's.

* server/mpm/event/event.c, server/mpm/worker/worker.c,
    server/mpm/prefork/prefork.c:
  Use ap_thread_create() instead of apr_thread_create.
  Create an apr_thread_t/ap_thread_current() for the main chaild thread usable
  at child_init().
  
* server/mpm/winnt/child.c:
  Use ap_thread_create() instead of CreateThread().
  Create an apr_thread_t/ap_thread_current() for the main chaild thread usable



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897460 13f79535-47bb-0310-9956-ffa450edef68
2022-01-25 17:34:57 +00:00
..
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2018-01-17 14:41:30 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2018-01-17 14:41:30 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2021-10-12 13:34:01 +00:00
2018-01-17 14:41:30 +00:00
2016-03-09 16:52:55 +00:00
2021-10-12 13:34:01 +00:00

The http2 module adds support for the HTTP/2 protocol to the server.

Specifically, it supports the protocols "h2" (HTTP2 over TLS) and "h2c" 
(HTTP2 over plain HTTP connections via Upgrade). Additionally it offers
the "direct" mode for both encrypted and unencrypted connections.

You may enable it for the whole server or specific virtual hosts only. 


BUILD

If you have libnghttp2 (https://nghttp2.org) installed on your system, simply
add 

    --enable-http2

to your httpd ./configure invocation. Should libnghttp2 reside in a unusual
location, add

    --with-nghttp2=<path>

to ./configure. <path> is expected to be the installation prefix, so there
should be a <path>/lib/libnghttp2.*. If your system support pkg-config,
<path>/lib/pkgconfig/libnghttp2.pc will be inspected.

If you want to link nghttp2 statically into the mod_http2 module, you may
similarly to mod_ssl add

    --enable-nghttp2-staticlib-deps

For this, the lib directory should only contain the libnghttp2.a, not its
shared cousins.


CONFIGURATION

If mod_http2 is enabled for a site or not depends on the new "Protocols"
directive. This directive list all protocols enabled for a server or
virtual host.

If you do not specify "Protocols" all available protocols are enabled. For
sites using TLS, the protocol supported by mod_http2 is "h2". For cleartext
http:, the offered protocol is "h2c".

The following is an example of a server that only supports http/1.1 in
general and offers h2 for a specific virtual host.

    ...
    Protocols http/1.1
    <virtualhost *:443>
        Protocols h2 http/1.1
        ...
    </virtualhost>

Please see the documentation of mod_http2 for a complete list and explanation 
of all options.


TLS CONFIGURATION

If you want to use HTTP/2 with a browser, most modern browsers will support
it without further configuration. However, browsers so far only support
HTTP/2 over TLS and are especially picky about the certificate and
encryption ciphers used.

Server admins may look for up-to-date information about "modern" TLS
compatibility under: 

  https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility