From ed1b2ba60e033c58131d4d2e2f554533a5e1527b Mon Sep 17 00:00:00 2001 From: archen <42872701+gasaimaple@users.noreply.github.com> Date: Sat, 31 Dec 2022 14:43:44 +0000 Subject: [PATCH] Reference code fixed. Merges https://github.com/espressif/esp-idf/pull/10469 --- docs/zh_CN/api-reference/protocols/esp_http_server.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh_CN/api-reference/protocols/esp_http_server.rst b/docs/zh_CN/api-reference/protocols/esp_http_server.rst index d79c4f64d1..3f45442bee 100644 --- a/docs/zh_CN/api-reference/protocols/esp_http_server.rst +++ b/docs/zh_CN/api-reference/protocols/esp_http_server.rst @@ -22,7 +22,7 @@ HTTP Server 组件提供了在 ESP32 上运行轻量级 Web 服务器的功能 esp_err_t get_handler(httpd_req_t *req) { /* 发送回简单的响应数据包 */ - const char[] resp = "URI GET Response"; + const char resp[] = "URI GET Response"; httpd_resp_send(req, resp, HTTPD_RESP_USE_STRLEN); return ESP_OK; } @@ -55,7 +55,7 @@ HTTP Server 组件提供了在 ESP32 上运行轻量级 Web 服务器的功能 } /* 发送简单的响应数据包 */ - const char[] resp = "URI POST Response"; + const char resp[] = "URI POST Response"; httpd_resp_send(req, resp, HTTPD_RESP_USE_STRLEN); return ESP_OK; }