summaryrefslogtreecommitdiff
path: root/modules/http2
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2015-09-28 19:30:00 +0000
committerJim Jagielski <jim@apache.org>2015-09-28 19:30:00 +0000
commitf2ce5d4ab53a2a0da7f79b4a25469ac96900ecb0 (patch)
tree00d24a549de3efa0f4fa5209278a758608e7f498 /modules/http2
parent4ba79718ef48a57188d9ef9e14126e9d9485cdf0 (diff)
downloadhttpd-f2ce5d4ab53a2a0da7f79b4a25469ac96900ecb0.tar.gz
Merge r1705749 from trunk:
bye bye mod_h2, hello mod_http2 Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1705751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2')
-rw-r--r--modules/http2/NWGNUmakefile4
-rw-r--r--modules/http2/README.h212
-rw-r--r--modules/http2/config.m427
-rw-r--r--modules/http2/h2_config.c4
-rw-r--r--modules/http2/h2_ctx.c6
-rw-r--r--modules/http2/h2_private.h4
-rw-r--r--modules/http2/h2_version.h4
-rw-r--r--modules/http2/mod_http2.c (renamed from modules/http2/mod_h2.c)6
-rw-r--r--modules/http2/mod_http2.dsp (renamed from modules/http2/mod_h2.dsp)42
9 files changed, 48 insertions, 61 deletions
diff --git a/modules/http2/NWGNUmakefile b/modules/http2/NWGNUmakefile
index cc08702b31..1ab6282db8 100644
--- a/modules/http2/NWGNUmakefile
+++ b/modules/http2/NWGNUmakefile
@@ -108,7 +108,7 @@ endif
# This is used by the link 'name' directive to name the nlm. If left blank
# TARGET_nlm (see below) will be used.
#
-NLM_NAME = mod_h2
+NLM_NAME = mod_http2
#
# This is used by the link '-desc ' directive.
@@ -230,7 +230,7 @@ FILES_nlm_Ximports = \
# Any symbols exported to here
#
FILES_nlm_exports = \
- h2_module \
+ http2_module \
$(EOLIST)
#
diff --git a/modules/http2/README.h2 b/modules/http2/README.h2
index 803f787f9a..399086b70b 100644
--- a/modules/http2/README.h2
+++ b/modules/http2/README.h2
@@ -1,4 +1,4 @@
-The h2 module adds support for the HTTP/2 protocol to the server.
+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
@@ -12,7 +12,7 @@ BUILD
If you have libnghttp2 (https://nghttp2.org) installed on your system, simply
add
- --enable-h2
+ --enable-http2
to your httpd ./configure invocation. Should libnghttp2 reside in a unusual
location, add
@@ -23,7 +23,7 @@ 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_h2 module, you may
+If you want to link nghttp2 statically into the mod_http2 module, you may
similarly to mod_ssl add
--enable-nghttp2-staticlib-deps
@@ -34,12 +34,12 @@ shared cousins.
CONFIGURATION
-If mod_h2 is enabled for a site or not depends on the new "Protocols"
+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_h2 is "h2". For cleartext
+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
@@ -52,7 +52,7 @@ general and offers h2 for a specific virtual host.
...
</virtualhost>
-Please see the documentation of mod_h2 for a complete list and explanation
+Please see the documentation of mod_http2 for a complete list and explanation
of all options.
diff --git a/modules/http2/config.m4 b/modules/http2/config.m4
index 4da7d25362..ad19373512 100644
--- a/modules/http2/config.m4
+++ b/modules/http2/config.m4
@@ -17,8 +17,8 @@ dnl # start of module specific part
APACHE_MODPATH_INIT(http2)
dnl # list of module object files
-h2_objs="dnl
-mod_h2.lo dnl
+http2_objs="dnl
+mod_http2.lo dnl
h2_alt_svc.lo dnl
h2_config.lo dnl
h2_conn.lo dnl
@@ -90,7 +90,7 @@ AC_DEFUN(APACHE_CHECK_NGHTTP2,[
PKG_CONFIG_PATH="${ap_nghttp2_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH
fi
- AC_ARG_ENABLE(nghttp2-staticlib-deps,APACHE_HELP_STRING(--enable-nghttp2-staticlib-deps,[link mod_h2 with dependencies of libnghttp2's static libraries (as indicated by "pkg-config --static"). Must be specified in addition to --enable-http2.]), [
+ AC_ARG_ENABLE(nghttp2-staticlib-deps,APACHE_HELP_STRING(--enable-nghttp2-staticlib-deps,[link mod_http2 with dependencies of libnghttp2's static libraries (as indicated by "pkg-config --static"). Must be specified in addition to --enable-http2.]), [
if test "$enableval" = "yes"; then
PKGCONFIG_LIBOPTS="--static"
fi
@@ -167,30 +167,17 @@ AC_DEFUN(APACHE_CHECK_NGHTTP2,[
])
-dnl # hook module into the Autoconf mechanism (--enable-http2 or
-dnl # --enabled-h2 option,)
+dnl # hook module into the Autoconf mechanism (--enable-http2)
APACHE_MODULE(http2, [HTTP/2 protocol handling in addition to HTTP protocol
-handling. Implemented by mod_h2. This module requires a libnghttp2 installation.
+handling. Implemented by mod_http2. This module requires a libnghttp2 installation.
See --with-nghttp2 on how to manage non-standard locations. This module
-is usually linked shared and requires loading. ], $h2_objs, , most, [
+is usually linked shared and requires loading. ], $http2_objs, , most, [
APACHE_CHECK_NGHTTP2
if test "$ac_cv_nghttp2" = "yes" ; then
if test "x$enable_ssl" = "xshared"; then
# The only symbol which needs to be exported is the module
# structure, so ask libtool to hide everything else:
- APR_ADDTO(MOD_H2_LDADD, [-export-symbols-regex h2_module])
- fi
- else
- enable_h2=no
- fi
-])
-APACHE_MODULE(h2, [HTTP/2 support (Deprecated. Use --enable-http2)], $h2_objs, , most, [
- APACHE_CHECK_NGHTTP2
- if test "$ac_cv_nghttp2" = "yes" ; then
- if test "x$enable_ssl" = "xshared"; then
- # The only symbol which needs to be exported is the module
- # structure, so ask libtool to hide everything else:
- APR_ADDTO(MOD_H2_LDADD, [-export-symbols-regex h2_module])
+ APR_ADDTO(MOD_HTTP2_LDADD, [-export-symbols-regex http2_module])
fi
else
enable_h2=no
diff --git a/modules/http2/h2_config.c b/modules/http2/h2_config.c
index a370bd620c..6db702eca8 100644
--- a/modules/http2/h2_config.c
+++ b/modules/http2/h2_config.c
@@ -178,7 +178,7 @@ int h2_config_geti(h2_config *conf, h2_config_var_t var)
h2_config *h2_config_sget(server_rec *s)
{
h2_config *cfg = (h2_config *)ap_get_module_config(s->module_config,
- &h2_module);
+ &http2_module);
AP_DEBUG_ASSERT(cfg);
return cfg;
}
@@ -365,7 +365,7 @@ const command_rec h2_cmds[] = {
h2_config *h2_config_rget(request_rec *r)
{
h2_config *cfg = (h2_config *)ap_get_module_config(r->per_dir_config,
- &h2_module);
+ &http2_module);
return cfg? cfg : h2_config_sget(r->server);
}
diff --git a/modules/http2/h2_ctx.c b/modules/http2/h2_ctx.c
index f37a1474a1..422835c2df 100644
--- a/modules/http2/h2_ctx.c
+++ b/modules/http2/h2_ctx.c
@@ -28,7 +28,7 @@ static h2_ctx *h2_ctx_create(const conn_rec *c)
{
h2_ctx *ctx = apr_pcalloc(c->pool, sizeof(h2_ctx));
AP_DEBUG_ASSERT(ctx);
- ap_set_module_config(c->conn_config, &h2_module, ctx);
+ ap_set_module_config(c->conn_config, &http2_module, ctx);
return ctx;
}
@@ -43,7 +43,7 @@ h2_ctx *h2_ctx_create_for(const conn_rec *c, h2_task_env *env)
h2_ctx *h2_ctx_get(const conn_rec *c)
{
- h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &h2_module);
+ h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
if (ctx == NULL) {
ctx = h2_ctx_create(c);
}
@@ -57,7 +57,7 @@ h2_ctx *h2_ctx_rget(const request_rec *r)
const char *h2_ctx_protocol_get(const conn_rec *c)
{
- h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &h2_module);
+ h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
return ctx? ctx->protocol : NULL;
}
diff --git a/modules/http2/h2_private.h b/modules/http2/h2_private.h
index 6931278401..a6081fc6bb 100644
--- a/modules/http2/h2_private.h
+++ b/modules/http2/h2_private.h
@@ -18,9 +18,9 @@
#include <nghttp2/nghttp2.h>
-extern module AP_MODULE_DECLARE_DATA h2_module;
+extern module AP_MODULE_DECLARE_DATA http2_module;
-APLOG_USE_MODULE(h2);
+APLOG_USE_MODULE(http2);
#define H2_HEADER_METHOD ":method"
diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
index dc2ce2ea3a..7ed711ffed 100644
--- a/modules/http2/h2_version.h
+++ b/modules/http2/h2_version.h
@@ -20,7 +20,7 @@
* @macro
* Version number of the h2 module as c string
*/
-#define MOD_H2_VERSION "0.9.9"
+#define MOD_HTTP2_VERSION "0.9.9"
/**
* @macro
@@ -28,7 +28,7 @@
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_H2_VERSION_NUM 0x000909
+#define MOD_HTTP2_VERSION_NUM 0x000909
#endif /* mod_h2_h2_version_h */
diff --git a/modules/http2/mod_h2.c b/modules/http2/mod_http2.c
index 1c7cd2d892..b1e79f16a5 100644
--- a/modules/http2/mod_h2.c
+++ b/modules/http2/mod_http2.c
@@ -37,7 +37,7 @@
static void h2_hooks(apr_pool_t *pool);
-AP_DECLARE_MODULE(h2) = {
+AP_DECLARE_MODULE(http2) = {
STANDARD20_MODULE_STUFF,
NULL,
NULL,
@@ -80,8 +80,8 @@ static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
ngh2 = nghttp2_version(0);
ap_log_error( APLOG_MARK, APLOG_INFO, 0, s,
- "mod_h2 (v%s, nghttp2 %s), initializing...",
- MOD_H2_VERSION, ngh2? ngh2->version_str : "unknown");
+ "mod_http2 (v%s, nghttp2 %s), initializing...",
+ MOD_HTTP2_VERSION, ngh2? ngh2->version_str : "unknown");
switch (h2_conn_mpm_type()) {
case H2_MPM_EVENT:
diff --git a/modules/http2/mod_h2.dsp b/modules/http2/mod_http2.dsp
index 3d73f19513..c3e139e955 100644
--- a/modules/http2/mod_h2.dsp
+++ b/modules/http2/mod_http2.dsp
@@ -1,24 +1,24 @@
-# Microsoft Developer Studio Project File - Name="mod_h2" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="mod_http2" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-CFG=mod_h2 - Win32 Release
+CFG=mod_http2 - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
-!MESSAGE NMAKE /f "mod_h2.mak".
+!MESSAGE NMAKE /f "mod_http2.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "mod_h2.mak" CFG="mod_h2 - Win32 Release"
+!MESSAGE NMAKE /f "mod_http2.mak" CFG="mod_http2 - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "mod_h2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "mod_h2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mod_http2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mod_http2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
@@ -29,7 +29,7 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
-!IF "$(CFG)" == "mod_h2 - Win32 Release"
+!IF "$(CFG)" == "mod_http2 - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -43,25 +43,25 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\mod_h2_src" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\mod_http2_src" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /fo"Release/mod_h2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_h2.so" /d LONG_NAME="http2_module for Apache"
+# ADD RSC /l 0x409 /fo"Release/mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /out:".\Release\mod_h2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_h2.so
-# ADD LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Release\mod_h2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_h2.so /opt:ref
+# ADD BASE LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /out:".\Release\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
+# ADD LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Release\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so /opt:ref
# Begin Special Build Tool
-TargetPath=.\Release\mod_h2.so
+TargetPath=.\Release\mod_http2.so
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
# End Special Build Tool
-!ELSEIF "$(CFG)" == "mod_h2 - Win32 Debug"
+!ELSEIF "$(CFG)" == "mod_http2 - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -75,19 +75,19 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Debug\mod_h2_src" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Debug\mod_http2_src" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /fo"Debug/mod_h2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_h2.so" /d LONG_NAME="http2_module for Apache"
+# ADD RSC /l 0x409 /fo"Debug/mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_h2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_h2.so
-# ADD LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_h2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_h2.so
+# ADD BASE LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
+# ADD LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
# Begin Special Build Tool
-TargetPath=.\Debug\mod_h2.so
+TargetPath=.\Debug\mod_http2.so
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
@@ -97,8 +97,8 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# Begin Target
-# Name "mod_h2 - Win32 Release"
-# Name "mod_h2 - Win32 Debug"
+# Name "mod_http2 - Win32 Release"
+# Name "mod_http2 - Win32 Debug"
# Begin Source File
SOURCE=./h2_alt_svc.c
@@ -197,7 +197,7 @@ SOURCE=./h2_workers.c
# End Source File
# Begin Source File
-SOURCE=./mod_h2.c
+SOURCE=./mod_http2.c
# End Source File
# Begin Source File