From: Anurag Kar Date: Mon, 6 May 2019 09:02:24 +0000 (+0530) Subject: esp_http_server : Minor clarification in httpd_req_get_url_query_str() API documentation X-Git-Tag: v3.3-rc~52^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0e7fd436954d7d5b7adb399a1eacdac4cfe876a;p=esp-idf esp_http_server : Minor clarification in httpd_req_get_url_query_str() API documentation Closes https://github.com/espressif/esp-idf/issues/3374 --- diff --git a/components/esp_http_server/include/esp_http_server.h b/components/esp_http_server/include/esp_http_server.h index 4094d9ef82..18552b25ec 100644 --- a/components/esp_http_server/include/esp_http_server.h +++ b/components/esp_http_server/include/esp_http_server.h @@ -870,7 +870,10 @@ size_t httpd_req_get_url_query_len(httpd_req_t *r); * a URI handler where httpd_req_t* request pointer is valid * - If output size is greater than input, then the value is truncated, * accompanied by truncation error as return value - * - Use httpd_req_get_url_query_len() to know the right buffer length + * - Prior to calling this function, one can use httpd_req_get_url_query_len() + * to know the query string length beforehand and hence allocate the buffer + * of right size (usually query string length + 1 for null termination) + * for storing the query string * * @param[in] r The request being responded to * @param[out] buf Pointer to the buffer into which the query string will be copied (if found)