From 9759aa4ad293894fa3afe42b2cef9073a8c72c62 Mon Sep 17 00:00:00 2001 From: morsisko Date: Sun, 29 Mar 2020 15:53:58 +0200 Subject: [PATCH] Fixed syntax error in esp_http_server.rst Merges: https://github.com/espressif/esp-idf/pull/5021 --- docs/en/api-reference/protocols/esp_http_server.rst | 2 +- docs/zh_CN/api-reference/protocols/esp_http_server.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/api-reference/protocols/esp_http_server.rst b/docs/en/api-reference/protocols/esp_http_server.rst index 50cc2278fe..86c773f9fd 100644 --- a/docs/en/api-reference/protocols/esp_http_server.rst +++ b/docs/en/api-reference/protocols/esp_http_server.rst @@ -35,7 +35,7 @@ Application Example * as well be any binary data (needs type casting). * In case of string data, null termination will be absent, and * content length would give length of string */ - char[100] content; + char content[100]; /* Truncate if content length larger than the buffer */ size_t recv_size = MIN(req->content_len, sizeof(content)); 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 7092c91790..5b1287cbaf 100644 --- a/docs/zh_CN/api-reference/protocols/esp_http_server.rst +++ b/docs/zh_CN/api-reference/protocols/esp_http_server.rst @@ -33,7 +33,7 @@ HTTP Server 组件提供了在 ESP32 上运行轻量级 Web 服务器的功能 /* 定义 HTTP POST 请求数据的目标缓存区 * httpd_req_recv() 只接收 char* 数据,但也可以是任意二进制数据(需要类型转换) * 对于字符串数据,null 终止符会被省略,content_len 会给出字符串的长度 */ - char[100] content; + char content[100]; /* 如果内容长度大于缓冲区则截断 */ size_t recv_size = MIN(req->content_len, sizeof(content));