Module Configuration


The μC/HTTP-server 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/HTTP-server 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.

The configurations set in the Module configuration affect all Web server instances. The following configuration values allow to reduce the memory footprint (RAM & ROM) and can impact the overall performance of all web server instances.

Argument Checking and Debug Configuration

Most functions in μC/HTTP-server 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/HTTP-server has been included to simplify debugging. There are several configuration constants used to aid debugging.

Table - Argument Checking and Debug Configuration
ConstantDescriptionPossible Values
HTTPs_CFG_ARG_CHK_EXT_ENAllows 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.DEF_ENABLED or DEF_DISABLED

HTTPs_CFG_DBG_INFO_EN

Enable/disable μC/HTTP-server debug information: Internal constants assigned to global variables.DEF_ENABLED or DEF_DISABLED


Counter Configuration

μC/HTTP-server 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/HTTP-server contains counters that are incremented when error conditions are detected. The following constants enable or disable HTTP counters.

Table - Statistics and Error Counter Configuration
ConstantDescriptionPossible Values

HTTPs_CFG_CTR_STAT_EN

Determines whether the code and data space used to keep track of statistics will be included.

DEF_ENABLED or DEF_DISABLED

HTTPs_CFG_CTR_ERR_EN

Determines whether the code and data space used to keep track of errors will be included.

DEF_ENABLED or DEF_DISABLED


File System Configuration

µC/HTTP-server can be used with or without a File System. See section Interface with File System for more details on the File System with the HTTP server.

Table - File System Configuration
ConstantDescriptionPossible Values
HTTPs_CFG_FS_PRESENT_ENDetermines whether or not a File System is present and must be used with HTTP server.DEF_DISABLED or DEF_ENABLED


Persistent Connection Configuration

µC/HTTP-server supports persistent connection when HTTP protocol version 1.1 is used.

The configuration related to Persistent Connection must also be enabled in the run-time configuration of each server instance for which this feature is wished. See section Parameters Configuration for more details.

See section Persistent Connection  for more details on HTTP Persistent Connection.

Table - Persistent Connection Configuration
ConstantDescriptionPossible Values
HTTPs_CFG_PERSISTENT_CONN_ENDetermines whether the code and data used to support the persistent connection feature will be included.DEF_DISABLED or DEF_ENABLED

Header Field Configuration

μC/HTTP-server contains code that allow the upper application to receive header field received in the request message and add header field to be transmitted with the response message.

The header parameters must also be defined in the run-time configuration of each server instance for which this feature is wished. See section Parameters Configuration and HTTP Header Configurationfor more details.

See section Headers for more details on HTTP header fields concept.

Panel - Header Field Configuration
ConstantDescriptionPossible Values

HTTPs_CFG_HDR_RX_EN

Determines whether the code and data space used to support additional header field in request will be included.

DEF_ENABLED or DEF_DISABLED
HTTPs_CFG_HDR_TX_EN

Determines whether the code and data space used to support additional header field in response will be included.

DEF_ENABLED or DEF_DISABLED


Query String Configuration

μC/HTTP-server contains code to allow the parsing and saving of Query String received in HTTP requests.

To enable this feature for a specific server instance, the parameter associated with the Query String must also be enabled in the the run-time configuration of the instance. See section Parameters Configuration and Query String Configuration for more details on the configuration.

See section Query String for additional details on the HTTP Query String concept.

Table - Query String Configuration
ConstantDescriptionPossibles  Values
HTTPs_CFG_QUERY_STR_ENDetermines whether the code and data space used to support Query String in HTTP request will be included.DEF_ENABLED or DEF_DISABLED

Form Submission Configuration

µC/HTTP-server can support the reception of HTML forms using the HTTP POST method. µC/HTTP-server is designed to manage different type of form encoding and also to upload files from an HTML form.

To enable this feature for a specific server instance, the parameter associated with the Form feature must also be enabled in the the run-time configuration of the instance. See section Parameters Configuration and HTTP Form Configuration for more details on the configuration.

See section Form for additional details on the HTML Form concept.

Table - Form HandlingConfiguration
ConstantDescriptionPossible Values

HTTPs_CFG_FORM_EN

Determines whether the code and data space used to support forms submission will be included. 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 Form's configurations are automatically disabled.DEF_ENABLED or DEF_DISABLED

HTTPs_CFG_FORM_MULTIPART_EN

Determines whether the code and data space used to support forms submission with “multipart/form-data” encoding will be included.DEF_ENABLED or DEF_DISABLED


Token Replacement Configuration

A considerable amount of code in μC/HTTP-server has been included to parse, replace and transmit HTML document with dynamic content using token replacement and the HTTP Chunked Transfer encoding.

To enable this feature for a specific server instance, the parameter associated with the Token feature must also be enabled in the the run-time configuration of the instance. See section Parameters Configuration and Token Configuration for more details on the configuration.

See section Dynamic Content for additional details on the HTTP concepts behind dynamic content.

Table - Dynamic Content Configuration
ConstantDescriptionPossible Values

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. If the server does not host dynamic content, the feature should be disabled in order to speed up processing.

DEF_DISABLED or DEF_ENABLED



Proxy Configuration

µC/HTTP-server can be accessed even if it’s located behind a proxy. 

Table - Proxy Configuration
ConstantDescriptionPossible Values

HTTPs_CFG_ABSOLUTE_URI_EN

 Determines whether the code and data space used to support header field for absolute URI.

DEF_ENABLED or DEF_DISABLED