kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/rename_http_server' into 'master'
Rename http_server component to esp_http_server See merge request idf/esp-idf!3553pull/2440/head
commit
cdb10ec5ad
|
@ -13,6 +13,9 @@
|
||||||
#if __has_include("esp_http_client.h")
|
#if __has_include("esp_http_client.h")
|
||||||
#include "esp_http_client.h"
|
#include "esp_http_client.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if __has_include("esp_http_server.h")
|
||||||
|
#include "esp_http_server.h"
|
||||||
|
#endif
|
||||||
#if __has_include("esp_image_format.h")
|
#if __has_include("esp_image_format.h")
|
||||||
#include "esp_image_format.h"
|
#include "esp_image_format.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,9 +40,6 @@
|
||||||
#if __has_include("esp_wps.h")
|
#if __has_include("esp_wps.h")
|
||||||
#include "esp_wps.h"
|
#include "esp_wps.h"
|
||||||
#endif
|
#endif
|
||||||
#if __has_include("http_server.h")
|
|
||||||
#include "http_server.h"
|
|
||||||
#endif
|
|
||||||
#if __has_include("nvs.h")
|
#if __has_include("nvs.h")
|
||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -456,7 +456,7 @@ static const esp_err_msg_t esp_err_msg_table[] = {
|
||||||
# ifdef ESP_ERR_HTTP_EAGAIN
|
# ifdef ESP_ERR_HTTP_EAGAIN
|
||||||
ERR_TBL_IT(ESP_ERR_HTTP_EAGAIN), /* 28679 0x7007 Mapping of errno EAGAIN to esp_err_t */
|
ERR_TBL_IT(ESP_ERR_HTTP_EAGAIN), /* 28679 0x7007 Mapping of errno EAGAIN to esp_err_t */
|
||||||
# endif
|
# endif
|
||||||
// components/http_server/include/http_server.h
|
// components/esp_http_server/include/esp_http_server.h
|
||||||
# ifdef ESP_ERR_HTTPD_BASE
|
# ifdef ESP_ERR_HTTPD_BASE
|
||||||
ERR_TBL_IT(ESP_ERR_HTTPD_BASE), /* 32768 0x8000 Starting number of HTTPD error codes */
|
ERR_TBL_IT(ESP_ERR_HTTPD_BASE), /* 32768 0x8000 Starting number of HTTPD error codes */
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#ifndef _HTTP_SERVER_H_
|
#ifndef _ESP_HTTP_SERVER_H_
|
||||||
#define _HTTP_SERVER_H_
|
#define _ESP_HTTP_SERVER_H_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -993,4 +993,4 @@ esp_err_t httpd_queue_work(httpd_handle_t handle, httpd_work_fn_t work, void *ar
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ! _HTTP_SERVER_H_ */
|
#endif /* ! _ESP_HTTP_SERVER_H_ */
|
|
@ -0,0 +1,2 @@
|
||||||
|
#warning http_server.h has been renamed to esp_http_server.h, please update include directives
|
||||||
|
#include "esp_http_server.h"
|
|
@ -22,8 +22,8 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
#include <http_server.h>
|
|
||||||
|
|
||||||
|
#include <esp_http_server.h>
|
||||||
#include "osal.h"
|
#include "osal.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
|
@ -20,8 +20,8 @@
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
#include "httpd_priv.h"
|
#include "esp_httpd_priv.h"
|
||||||
#include "ctrl_sock.h"
|
#include "ctrl_sock.h"
|
||||||
|
|
||||||
static const char *TAG = "httpd";
|
static const char *TAG = "httpd";
|
|
@ -18,9 +18,9 @@
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
#include <http_parser.h>
|
#include <http_parser.h>
|
||||||
#include <http_server.h>
|
|
||||||
|
|
||||||
#include "httpd_priv.h"
|
#include <esp_http_server.h>
|
||||||
|
#include "esp_httpd_priv.h"
|
||||||
#include "osal.h"
|
#include "osal.h"
|
||||||
|
|
||||||
static const char *TAG = "httpd_parse";
|
static const char *TAG = "httpd_parse";
|
|
@ -17,8 +17,8 @@
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
#include "httpd_priv.h"
|
#include "esp_httpd_priv.h"
|
||||||
|
|
||||||
static const char *TAG = "httpd_sess";
|
static const char *TAG = "httpd_sess";
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
#include "httpd_priv.h"
|
#include "esp_httpd_priv.h"
|
||||||
|
|
||||||
static const char *TAG = "httpd_txrx";
|
static const char *TAG = "httpd_txrx";
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
#include <http_parser.h>
|
#include <http_parser.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
#include "httpd_priv.h"
|
#include "esp_httpd_priv.h"
|
||||||
|
|
||||||
static const char *TAG = "httpd_uri";
|
static const char *TAG = "httpd_uri";
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
set(COMPONENT_SRCDIRS ".")
|
||||||
|
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||||
|
|
||||||
|
set(COMPONENT_REQUIRES unity esp_http_server)
|
||||||
|
|
||||||
|
register_component()
|
|
@ -15,7 +15,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
|
@ -1,6 +0,0 @@
|
||||||
set(COMPONENT_SRCDIRS ".")
|
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES unity http_server)
|
|
||||||
|
|
||||||
register_component()
|
|
|
@ -12,7 +12,7 @@ set(COMPONENT_SRCS "src/common/protocomm.c"
|
||||||
"src/transports/protocomm_console.c"
|
"src/transports/protocomm_console.c"
|
||||||
"src/transports/protocomm_httpd.c")
|
"src/transports/protocomm_httpd.c")
|
||||||
|
|
||||||
set(COMPONENT_PRIV_REQUIRES protobuf-c mbedtls console http_server bt)
|
set(COMPONENT_PRIV_REQUIRES protobuf-c mbedtls console esp_http_server bt)
|
||||||
|
|
||||||
if(CONFIG_BT_ENABLED)
|
if(CONFIG_BT_ENABLED)
|
||||||
if(CONFIG_BLUEDROID_ENABLED)
|
if(CONFIG_BLUEDROID_ENABLED)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
#include <protocomm.h>
|
#include <protocomm.h>
|
||||||
#include <protocomm_httpd.h>
|
#include <protocomm_httpd.h>
|
||||||
|
|
|
@ -97,7 +97,7 @@ INPUT = \
|
||||||
## mDNS
|
## mDNS
|
||||||
../../components/mdns/include/mdns.h \
|
../../components/mdns/include/mdns.h \
|
||||||
../../components/esp_http_client/include/esp_http_client.h \
|
../../components/esp_http_client/include/esp_http_client.h \
|
||||||
../../components/http_server/include/http_server.h \
|
../../components/esp_http_server/include/esp_http_server.h \
|
||||||
##
|
##
|
||||||
## Provisioning - API Reference
|
## Provisioning - API Reference
|
||||||
##
|
##
|
||||||
|
|
|
@ -81,7 +81,7 @@ Application Example
|
||||||
/* Generate default configuration */
|
/* Generate default configuration */
|
||||||
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
|
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
|
||||||
|
|
||||||
/* Empty handle to http_server */
|
/* Empty handle to esp_http_server */
|
||||||
httpd_handle_t server = NULL;
|
httpd_handle_t server = NULL;
|
||||||
|
|
||||||
/* Start the httpd server */
|
/* Start the httpd server */
|
||||||
|
@ -154,4 +154,4 @@ Check the example under :example:`protocols/http_server/persistent_sockets`.
|
||||||
API Reference
|
API Reference
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
.. include:: /_build/inc/http_server.inc
|
.. include:: /_build/inc/esp_http_server.inc
|
|
@ -7,7 +7,7 @@ Protocols API
|
||||||
mDNS <mdns>
|
mDNS <mdns>
|
||||||
ESP-TLS <esp_tls>
|
ESP-TLS <esp_tls>
|
||||||
HTTP Client <esp_http_client>
|
HTTP Client <esp_http_client>
|
||||||
HTTP Server <http_server>
|
HTTP Server <esp_http_server>
|
||||||
ASIO <asio>
|
ASIO <asio>
|
||||||
ESP-MQTT <mqtt>
|
ESP-MQTT <mqtt>
|
||||||
Modbus slave <modbus>
|
Modbus slave <modbus>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
.. include:: ../../../en/api-reference/protocols/esp_http_server.rst
|
|
@ -1 +0,0 @@
|
||||||
.. include:: ../../../en/api-reference/protocols/http_server.rst
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __HTTPD_TESTS_H__
|
#ifndef __HTTPD_TESTS_H__
|
||||||
#define __HTTPD_TESTS_H__
|
#define __HTTPD_TESTS_H__
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
extern httpd_handle_t start_tests(void);
|
extern httpd_handle_t start_tests(void);
|
||||||
extern void stop_tests(httpd_handle_t hd);
|
extern void stop_tests(httpd_handle_t hd);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
/* An example to demonstrate persistent sockets, with context maintained across
|
/* An example to demonstrate persistent sockets, with context maintained across
|
||||||
* multiple requests on that socket.
|
* multiple requests on that socket.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <nvs_flash.h>
|
#include <nvs_flash.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <http_server.h>
|
#include <esp_http_server.h>
|
||||||
|
|
||||||
/* A simple example that demonstrates how to create GET and POST
|
/* A simple example that demonstrates how to create GET and POST
|
||||||
* handlers for the web server.
|
* handlers for the web server.
|
||||||
|
|
Ładowanie…
Reference in New Issue