Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dynamic request handler module
This module implements dynamic content processing for HTTP requests. More...
Functions | |
| int | HttpDynamic_InitRequest (uint16 uConnection, struct HttpBlob resource) |
| Initialize HttpDynamic module state for a new request, and identify the request This function must examine the specified resource string and determine whether it can commit to process this request Also, if the resource string includes any information that this module needs in order to process the request (such as the contents of the query string) then it is the responsibility of this function to parse this information and store it in a connection-specific struct. | |
| void | HttpDynamic_ProcessRequest (struct HttpRequest *request) |
| Process a dynamic-content HTTP request This function is only be called by the core, if HttpDynamic_InitRequest() returns nonzero. | |
Detailed Description
This module implements dynamic content processing for HTTP requests.
All requests are handled by C code functions, and the response contents is returned via HttpResopnse routines Note this module is only compiled if HTTP_CORE_ENABLE_DYNAMIC is defined in HttpConfig.h
Function Documentation
| int HttpDynamic_InitRequest | ( | uint16 | uConnection, |
| struct HttpBlob | resource | ||
| ) |
Initialize HttpDynamic module state for a new request, and identify the request This function must examine the specified resource string and determine whether it can commit to process this request Also, if the resource string includes any information that this module needs in order to process the request (such as the contents of the query string) then it is the responsibility of this function to parse this information and store it in a connection-specific struct.
If this function returns nonzero, then the core will call HttpDynamic_ProcessRequest() with the rest of the request details.
- Parameters:
-
uConnection The number of the connection. This value is guaranteed to satisfy: 0 <= uConnection < HTTP_CORE_MAX_CONNECTIONS resource The resource part of the URL, as specified by the browser in the request, including any query string (and hash) Note: The resource string exists ONLY during the call to this function. The string pointer should not be copied by this function.
- Returns:
- nonzero if request is to be handled by this module. zero if not.
Definition at line 80 of file HttpDynamic.cpp.
| void HttpDynamic_ProcessRequest | ( | struct HttpRequest * | request ) |
Process a dynamic-content HTTP request This function is only be called by the core, if HttpDynamic_InitRequest() returns nonzero.
This function processes the specified HTTP request, and send the response on the connection specified by request->uConnection. This function must call the HttpResponse_*() functions in order to send data back to the browser. Please refer to HttpResponse.h for more information.
- Parameters:
-
request Pointer to all data available about the request
Definition at line 187 of file HttpDynamic.cpp.
Generated on Wed Jul 13 2022 13:30:51 by
1.7.2