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.
...
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
...
μ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.
HTTP CGI / Form Submission Configuration
µC/HTTPs allows to use forms in HTML documents using the HTTP POST method. µC/HTTPs is designed to manage different type of form encoding and also to upload files from an HTML form.
HTTPs_CFG_CGI_EN
HTTPs_CFG_CGI_EN
determines whether the code and data space used to support forms submission will be included. HTTPs_CFG_CGI_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
If the server does not host form, this feature should be disabled in order to speed up processing.
If this feature is set as disabled all other CGI configurations are automatically disabled.
HTTPs_CFG_POLL_EN
HTTPs_CFG_CGI_POLL_EN
determines whether the code and data space used to support hook function to poll the upper application will be called to know the end of form processing. HTTPs_CFG_CGI_POLL_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
Note that all hook functions must be non-blocking, if the processing of forms can take a while, poll hook function should be use and implemented to avoid the CGI submit hook function to take a long time to return.
HTTPs_CFG_MULTIPART_EN
HTTPs_CFG_CGI_MULTIPART_EN
determines whether the code and data space used to support forms submission with “multipart/form-data” encoding will be included. HTTPs_CFG_CGI_MULTIPART_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
HTTPs_CFG_CGI_FILE_UPLOAD_EN
HTTPs_CFG_CGI_FILE_UPLOAD_EN
determines whether the code and data space used to support file uploading will be included. HTTPs_CFG_CGI_FILE_UPLOAD_EN
can be set to either DEF_DISABLED
or DEF_ENABLED
.
Note that file upload is only supported using “multipart/form-data” encoding