The μC/HTTPs module has to be configured according to specific needs. A template configuration file (http-s_cfg.h
) is included in the module package (see µC/HTTPs Directories and Files), and this configuration should be copied into the application directory and included to the project. Here is the list of the values and description of each of the configuration variable. However, keep in mind that future releases of this module might include more configuration options.
Argument Checking and Debug Configuration
Most functions in μC/HTTPs include code to validate arguments that are passed to it. Specifically, μC/TCP-IP checks to see if passed pointers are NULL, if arguments are within valid ranges, etc. The following constants configure additional argument checking.
A fair amount of code in μC/HTTPs has been included to simplify debugging. There are several configuration constants used to aid debugging.
HTTPs_CFG_ARG_CHK_EN
HTTPs_CFG_ARG_CHK_EXT_EN
allows code to be generated to check arguments for functions that can be called by the user and, for functions which are internal but receive arguments from an API that the user can call. HTTPs_CFG_ARG_CHK_EXT_EN
can be set to either DEF_DISABLED
orDEF_ENABLED
.
HTTPs_CFG_DGB_INFO_EN
HTPPs_CFG_DBG_INFO_EN
is used to enable/disable μC/HTTPs debug information: Internal constants assigned to global variables. HTPPs_CFG_DBG_INFO_EN
can be set to either DEF_DISABLED
or DEF_ENA
Counter Configuration
μC/HTTPs contains code that increments counters to keep track of statistics such as the number of request received, the number of connection processed, etc. Also, μC/HTTPs contains counters that are incremented when error conditions are detected. The following constants enable or disable HTTP counters.
HTTPs_CFG_CTR_STAT_EN
HTTPs_CFG_CTR_STAT_EN
determines whether the code and data space used to keep track of statistics will be included. HTTPs_CFG_CTR_STAT_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
HTTPs_CFG_CTR_ERR_EN
HTTPs_CFG_CTR_ERR_EN
determines whether the code and data space used to keep track of errors will be included. HTTPs_CFG_CTR_ERR_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
HTTP Dynamic Content Configuration
A considerable amount of code in μC/HTTPs has been included to parse, replace and transmit html document with dynamic content.
HTTPs_CFG_TOKEN_PARSE_EN
HTTPs_CFG_TOKEN_PARSE_EN
determines whether the code and data space used to support the parsing of the tokens found in HTML files for dynamic content will be included. HTTPs_CFG_TOKEN_PARSE_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
If the server does not host dynamic content, the feature should be disabled in order to speed up processing.