esp_http_server : APIs renamed and context get/set implementations fixed

* http_sess_set_*_override APIs are now the only ones available to set custom recv/send/pending functions
* Fixed side effects to using http_sess_set/get_context inside URI handlers
This commit is contained in:
Anurag Kar
2018-11-02 23:55:40 +05:30
committed by bot
parent 639502ed5d
commit 9a9d18e466
6 changed files with 166 additions and 168 deletions

View File

@@ -201,8 +201,10 @@ esp_err_t httpd_uri(struct httpd_data *hd)
if (uri == NULL) {
switch (err) {
case HTTPD_404_NOT_FOUND:
ESP_LOGW(TAG, LOG_FMT("URI '%s' not found"), req->uri);
return httpd_resp_send_err(req, HTTPD_404_NOT_FOUND);
case HTTPD_405_METHOD_NOT_ALLOWED:
ESP_LOGW(TAG, LOG_FMT("Method '%d' not allowed for URI '%s'"), req->method, req->uri);
return httpd_resp_send_err(req, HTTPD_405_METHOD_NOT_ALLOWED);
default:
return ESP_FAIL;