mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-05 04:49:21 +00:00
feat(https_server): Added checks to verify if uri is empty
Added the checks if the URI is empty for the funtions httpd_req_get_url_query_len and httpd_req_get_url_query_str in httpd_parser.c
This commit is contained in:
@@ -964,7 +964,7 @@ esp_err_t httpd_req_get_hdr_value_str(httpd_req_t *r, const char *field, char *v
|
||||
*
|
||||
* @return
|
||||
* - Length : Query is found in the request URL
|
||||
* - Zero : Query not found / Null arguments / Invalid request
|
||||
* - Zero : Query not found / Null arguments / Invalid request / uri is empty
|
||||
*/
|
||||
size_t httpd_req_get_url_query_len(httpd_req_t *r);
|
||||
|
||||
@@ -992,6 +992,7 @@ size_t httpd_req_get_url_query_len(httpd_req_t *r);
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : Query is found in the request URL and copied to buffer
|
||||
* - ESP_FAIL : uri is empty
|
||||
* - ESP_ERR_NOT_FOUND : Query not found
|
||||
* - ESP_ERR_INVALID_ARG : Null arguments
|
||||
* - ESP_ERR_HTTPD_INVALID_REQ : Invalid HTTP request pointer
|
||||
|
Reference in New Issue
Block a user