Explorar el Código

Rename mod_http2.inl to http2.inl

The name "mod_*" is used for interfacing third party modules, but http2.inl is not third party.
bel2125 hace 3 años
padre
commit
8833c6bb12

+ 1 - 1
VisualStudio/civetweb_lua/civetweb_lua.vcxproj

@@ -208,7 +208,7 @@
   <ItemGroup>
     <None Include="..\..\src\handle_form.inl" />
     <None Include="..\..\src\md5.inl" />
-    <None Include="..\..\src\mod_http2.inl" />
+    <None Include="..\..\src\http2.inl" />
     <None Include="..\..\src\mod_lua_shared.inl" />
     <None Include="..\..\src\mod_mbedtls.inl" />
     <None Include="..\..\src\openssl_dl.inl" />

+ 1 - 1
VisualStudio/civetweb_lua/civetweb_lua.vcxproj.filters

@@ -17,7 +17,7 @@
   <ItemGroup>
     <None Include="..\..\src\handle_form.inl" />
     <None Include="..\..\src\md5.inl" />
-    <None Include="..\..\src\mod_http2.inl" />
+    <None Include="..\..\src\http2.inl" />
     <None Include="..\..\src\mod_lua_shared.inl" />
     <None Include="..\..\src\response.inl" />
     <None Include="..\..\src\mod_zlib.inl" />

+ 5 - 3
docs/Embedding.md

@@ -3,8 +3,9 @@ Embedding CivetWeb
 
 CivetWeb is primarily designed so applications can easily add HTTP and HTTPS server as well as WebSocket (WS and WSS) server functionality.
 For example, a C/C++ application could use CivetWeb to enable a web service and configuration interface, to add a HTML5 data visualization interface, for automation or remote control, as a protocol gateway or as a HTTP/WebSocket client for firewall traversal.
+Often the easiest way to embedd CivetWeb is to add the civetweb.c file into your existing C project (see below).
 
-It can also be used as a stand-alone executable. It can deliver static files and offers built-in server side Lua, JavaScript and CGI support. Some instructions how to build the stand-alone server can be found in [Building.md](https://github.com/civetweb/civetweb/blob/master/docs/Building.md).
+CivetWeb can also be used as a stand-alone executable. It can deliver static files and offers built-in server side Lua, JavaScript and CGI support. Some instructions how to build the stand-alone server can be found in [Building.md](https://github.com/civetweb/civetweb/blob/master/docs/Building.md).
 
 
 Files
@@ -31,6 +32,7 @@ but all functions required to run a HTTP server.
     - src/handle\_form.inl (HTML form handling functions)
     - src/response.inl (helper for generating HTTP response headers)
     - src/timer.inl (optional timer support)
+    - src/http2.inl (optional HTTP2 support)
   - Optional: C++ wrapper
     - include/CivetServer.h (C++ interface)
     - src/CivetServer.cpp (C++ wrapper implementation)
@@ -286,7 +288,7 @@ Initializing a HTTP server
 }
 ```
 
-A simple callback (HTTP/1.x and HTTP/2):
+A simple callback (new structure supporting HTTP/1.x and HTTP/2):
 ```C
 static int
 handler(struct mg_connection *conn, void *ignored)
@@ -302,7 +304,7 @@ handler(struct mg_connection *conn, void *ignored)
 }
 ```
 
-A simple callback supporting HTTP/1.x only:
+A simple callback (old structure supporting HTTP/1.x only):
 ```C
 static int
 handler(struct mg_connection *conn, void *ignored)

+ 1 - 1
format.bat

@@ -13,7 +13,7 @@ clang-format -i src/openssl_dl.inl
 clang-format -i src/timer.inl
 clang-format -i src/handle_form.inl
 clang-format -i src/response.inl
-clang-format -i src/mod_http2.inl
+clang-format -i src/http2.inl
 clang-format -i src/mod_mbedtls.inl
 
 clang-format -i src/third_party/civetweb_lua.h

+ 1 - 1
resources/check_defines.lua

@@ -65,7 +65,7 @@ noifdef(path .. "src/civetweb_private_lua.h")
 noifdef(path .. "src/main.c")
 noifdef(path .. "src/md5.inl")
 noifdef(path .. "src/mod_duktape.inl")
-noifdef(path .. "src/mod_http2.inl")
+noifdef(path .. "src/http2.inl")
 noifdef(path .. "src/mod_lua.inl")
 noifdef(path .. "src/mod_lua_shared.inl")
 noifdef(path .. "src/mod_zlib.inl")

+ 1 - 1
src/civetweb.c

@@ -6571,7 +6571,7 @@ handle_request_stat_log(struct mg_connection *conn)
 #error "HTTP2 requires ALPN, APLN requires SSL/TLS"
 #endif
 #define USE_ALPN
-#include "mod_http2.inl"
+#include "http2.inl"
 /* Not supported with HTTP/2 */
 #define HTTP1_only                                                             \
 	{                                                                          \

+ 0 - 0
src/mod_http2.inl → src/http2.inl