Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update esp_http_server from ESP-IDF (GIT8266O-763) #1186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions components/esp_http_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
set(COMPONENT_ADD_INCLUDEDIRS include)
set(COMPONENT_PRIV_INCLUDEDIRS src/port/esp8266 src/util)
set(COMPONENT_SRCS "src/httpd_main.c"
"src/httpd_parse.c"
"src/httpd_sess.c"
"src/httpd_txrx.c"
"src/httpd_uri.c"
"src/util/ctrl_sock.c")

set(COMPONENT_PRIV_REQUIRES lwip)
set(COMPONENT_REQUIRES http_parser)

register_component()
idf_component_register(SRCS "src/httpd_main.c"
"src/httpd_parse.c"
"src/httpd_sess.c"
"src/httpd_txrx.c"
"src/httpd_uri.c"
"src/httpd_ws.c"
"src/util/ctrl_sock.c"
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "src/port/esp8266" "src/util"
REQUIRES nghttp # for http_parser.h
PRIV_REQUIRES lwip mbedtls esp_timer)
55 changes: 44 additions & 11 deletions components/esp_http_server/Kconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
menu "HTTP Server"

config HTTPD_MAX_REQ_HDR_LEN
int "Max HTTP Request Header Length"
default 512
help
This sets the maximum supported size of headers section in HTTP request packet to be processed by the server

config HTTPD_MAX_URI_LEN
int "Max HTTP URI Length"
default 512
help
This sets the maximum supported size of HTTP request URI to be processed by the server
config HTTPD_MAX_REQ_HDR_LEN
int "Max HTTP Request Header Length"
default 512
help
This sets the maximum supported size of headers section in HTTP request packet to be processed by the
server

config HTTPD_MAX_URI_LEN
int "Max HTTP URI Length"
default 512
help
This sets the maximum supported size of HTTP request URI to be processed by the server

config HTTPD_ERR_RESP_NO_DELAY
bool "Use TCP_NODELAY socket option when sending HTTP error responses"
default y
help
Using TCP_NODEALY socket option ensures that HTTP error response reaches the client before the
underlying socket is closed. Please note that turning this off may cause multiple test failures

config HTTPD_PURGE_BUF_LEN
int "Length of temporary buffer for purging data"
default 32
help
This sets the size of the temporary buffer used to receive and discard any remaining data that is
received from the HTTP client in the request, but not processed as part of the server HTTP request
handler.

If the remaining data is larger than the available buffer size, the buffer will be filled in multiple
iterations. The buffer should be small enough to fit on the stack, but large enough to avoid excessive
iterations.

config HTTPD_LOG_PURGE_DATA
bool "Log purged content data at Debug level"
default n
help
Enabling this will log discarded binary HTTP request data at Debug level.
For large content data this may not be desirable as it will clutter the log.

config HTTPD_WS_SUPPORT
bool "WebSocket server support"
default n
help
This sets the WebSocket server support.

endmenu
1 change: 0 additions & 1 deletion components/esp_http_server/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
COMPONENT_SRCDIRS := src src/util
COMPONENT_ADD_INCLUDEDIRS := include
COMPONENT_PRIV_INCLUDEDIRS := src/port/esp8266 src/util

Loading