Configuration of the HTTP server in µVision.
Configuration of the HTTP server in µVision.
HTTP Server Configuration File
The HTTP server configuration file Net_Config_HTTP_Server.h contains the following settings:
- Number of Sessions specifies the number of simultaneously active HTTP sessions. This number should be increased when delays are observed while loading pages in a web browser. This increases also total RAM usage. Web pages can contain many objects (like GIF or JPEG images). The remote HTTP client (web browser) opens multiple connections when downloading such pages. If there are not enough sessions configured for a parallel load, excess connections are rejected by the HTTP server. The browser then starts the socket recovery mode and retries to load missing resources. This recovery causes a delay which varies for different browsers.
- Port Number specifies the listening TCP port number. The default HTTP server listening port is 80. For HTTP over SSL/TLS (HTTPS) the default listening port is 443. If the Port Number is 0, the system automatically selects the appropriate port number for communication.
- Server-Id header specifies the custom HTTP server header identification. This identification is contained in each Web server response packet. When this option contains an empty string, a default Server-Id from the library is used instead.
- The Enable User Authentication switch enables or disables authentication with a username and a password.
- Authentication Scheme specifies the type of authentication to be used. The types supported are Basic and Digest.
- Authentication Realm is the string which is displayed in the browser's authentication dialog if an authentication is required. This is a null-terminated string.
- Built-In Administrator Account enables the usage of a built-in user account.
- Administrator Username sets the username for the built-in account. The application can change the username at runtime using netHTTPs_SetUsername.
- Administrator Secret sets the default secret word. This can be a clear text password or a pre-calculated HA1 value for Digest authentication. The application can change the secret word at runtime using netHTTPs_SetPassword.
- Enable Root Folder can be used to specify a root folder on the current storage device that will be used as the entry point for all HTTP operations.
- Web Root Folder specifies the directory that is to be used as root folder.
Additional configuration settings for HTTP server:
- The HTTP_SERVER_NONCE_TAB_SIZE defines the number of nonce cache entries. The default setting is 8.
- The HTTP_SERVER_NONCE_CACHE_TOUT defines the expiration time for the nonce cache entries. The default setting is 60 seconds.
These settings are used in the digest authentication. You can increase the size of the cache table if you experience problems with the user authentication for the digest authentication mode. It is recommended that you keep the default setting.