|
@@ -2,21 +2,27 @@
|
|
|
|
|
|
## Proposed interface changes for future versions
|
|
|
|
|
|
-See [this GitHub issue](https://github.com/civetweb/civetweb/issues/544).
|
|
|
+Interface changes from 1.10 to 1.11 and/or later versions -
|
|
|
+see also [this GitHub issue](https://github.com/civetweb/civetweb/issues/544).
|
|
|
|
|
|
|
|
|
### Server interface
|
|
|
|
|
|
-#### mg\_start / mg\_init\_library
|
|
|
+#### S1: mg\_start / mg\_init\_library
|
|
|
|
|
|
Calling mg\_init\_library is recommended before calling mg\_start.
|
|
|
|
|
|
-Compatibility:
|
|
|
+**Compatibility considerations:**
|
|
|
Initially, mg\_init\_library will be called implicitly if it has
|
|
|
not been called before mg\_start.
|
|
|
If mg\_init\_library was not called, mg\_stop may leave memory leaks.
|
|
|
|
|
|
-#### mg\_websocket\_write functions
|
|
|
+**Required Actions:**
|
|
|
+Call mg\_init\_library manually to avoid a small memory leak when
|
|
|
+closing the server.
|
|
|
+
|
|
|
+
|
|
|
+#### S2: mg\_websocket\_write functions
|
|
|
|
|
|
Calling mg\_lock\_connection is no longer called implicitly
|
|
|
in mg\_websocket\_write functions.
|
|
@@ -26,49 +32,90 @@ other connection.
|
|
|
|
|
|
This is an API harmonization issue.
|
|
|
|
|
|
-Compatibility:
|
|
|
+**Compatibility considerations:**
|
|
|
If a websocket connection was used in only one thread, there is
|
|
|
no incompatibility. If a websocket connection was used in multiple
|
|
|
threads, the user has to add the mg\_lock\_connection before and
|
|
|
the mg\_unlock\_connection after the websocket write call.
|
|
|
|
|
|
-#### open\_file member of mg\_callbacks
|
|
|
+**Required Actions:**
|
|
|
+Call mg\_lock\_connection and mg\_unlock\_connection manually
|
|
|
+when using mg\_websocket\_write.
|
|
|
+
|
|
|
+
|
|
|
+#### S3: open\_file member of mg\_callbacks
|
|
|
|
|
|
This member is going to be removed.
|
|
|
It is superseeded by mg\_add\_request\_handler.
|
|
|
|
|
|
-Compatibility:
|
|
|
+**Compatibility considerations:**
|
|
|
Current code using open\_file needs to be changed.
|
|
|
Instructions how to do this will be provided.
|
|
|
|
|
|
|
|
|
-### Client interface
|
|
|
+#### S4: Support multiple hostnames and SNI
|
|
|
+
|
|
|
+TLS [Server Name Identification (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication)
|
|
|
+allows to host different domains with different X.509 certificates
|
|
|
+on the same physical server (same IP+port). In order to support this,
|
|
|
+some configurations (like authentication\_domain, ssl\_certificate,
|
|
|
+document\_root and may others) need to be specified multiple times -
|
|
|
+once for each domain hosted
|
|
|
+(see [535](https://github.com/civetweb/civetweb/issues/535)).
|
|
|
+
|
|
|
+The current configuration model does not account for SNI, so it needs
|
|
|
+to be extended to support configuration of multiple instances.
|
|
|
+
|
|
|
+**Compatibility considerations:**
|
|
|
+To be defined as soon as possible solutions are evaluated.
|
|
|
|
|
|
|
|
|
-#### mg\_init\_library
|
|
|
+#### S5: IPv6 support for access\_control\_list and throttle
|
|
|
+
|
|
|
+The current configuration for access\_control\_list and throttle only
|
|
|
+works for IPv4 addresses. If server and client support
|
|
|
+[IPv6](https://en.wikipedia.org/wiki/IPv6_address) as well,
|
|
|
+there is no way to add a client to the throttle or access list.
|
|
|
+The current configuration syntax isn't really comfortable for IPv4
|
|
|
+either.
|
|
|
+Combined with hosting multiple domains (and SNI), different domains
|
|
|
+may have different block/throttle configurations as well - this has
|
|
|
+to be considered in a new configuration as well.
|
|
|
+
|
|
|
+**Compatibility considerations:**
|
|
|
+To be defined as soon as possible solutions are evaluated.
|
|
|
+
|
|
|
+
|
|
|
+### Client interface
|
|
|
+
|
|
|
+#### C1: mg\_init\_library
|
|
|
|
|
|
Calling mg\_init\_library is required before calling any client
|
|
|
function. In particular, the TLS initialization must be done
|
|
|
before using mg\_connect\_client\_secure.
|
|
|
|
|
|
-Compatibility:
|
|
|
+**Compatibility considerations:**
|
|
|
Some parts of the client interface did not work, if mg\_start
|
|
|
-was not called before. Now server and client become independent.
|
|
|
+was not called before. Now it works after calling
|
|
|
+mg\_init\_library - this is not an incompatibility.
|
|
|
|
|
|
-#### mg\_connect\_client (family)
|
|
|
|
|
|
-mg_connect_client needs several new parameters (options).
|
|
|
+#### C2: mg\_connect\_client (family)
|
|
|
+
|
|
|
+mg\_connect\_client needs several new parameters (options).
|
|
|
|
|
|
Details are to be defined.
|
|
|
|
|
|
-mg_connect_client and mg_download should return a different kind of
|
|
|
+mg\_connect\_client and mg\_download should return a different kind of
|
|
|
mg_connection than used in server callbacks. At least, there should
|
|
|
-be a function mg_get_response_info, instead of using
|
|
|
-mg_get_request_info, and getting the HTTP response code from the
|
|
|
-server by looking into the uri member of struct mg_request_info.
|
|
|
+be a function mg\_get\_response\_info, instead of using
|
|
|
+mg\_get\_request\_info, and getting the HTTP response code from the
|
|
|
+server by looking into the uri member of struct mg\_request\_info.
|
|
|
+
|
|
|
|
|
|
+### General interfaces
|
|
|
|
|
|
-### `size_t` in all interface
|
|
|
+#### G1: `size_t` in all interface
|
|
|
|
|
|
Having `size_t` in interfaces while building for 32 and 64 bit
|
|
|
complicates maintenance in an unnecessary way
|
|
@@ -77,7 +124,7 @@ complicates maintenance in an unnecessary way
|
|
|
Replace all data sizes by 64 bit integers.
|
|
|
|
|
|
|
|
|
-### Pattern definition
|
|
|
+#### G2: Pattern definition
|
|
|
|
|
|
The current definition of pattern matching is problematic
|
|
|
(see [499](https://github.com/civetweb/civetweb/issues/499)).
|