Original code developed as a GSoC 2023 project by Emna Rekik. Code refactored in order to provide better bisectability as the origical commits were not bisectable. The server supports static and dynamic resources, managed by HTTP_SERVICE/HTTP_RESOURCE macros. Fixes #59685 Fixes #59686 Fixes #59688 Fixes #59690 Fixes #59670 Fixes #59700 Fixes #59684 Fixes #59693 Fixes #59693 Fixes #59694 Fixes #59699 Fixes #59696 Fixes #59688 Fixes #59690 Fixes #59670 Fixes #59700 Fixes #59685 Fixes #59686 Fixes #59688 Fixes #59691 Signed-off-by: Emna Rekik <emna.rekik007@gmail.com> Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
128 lines
3.4 KiB
Plaintext
128 lines
3.4 KiB
Plaintext
# Copyright (c) 2016 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config HTTP_PARSER
|
|
bool "HTTP Parser support"
|
|
select HTTP_PARSER_URL
|
|
help
|
|
This option enables the http_parser library from nodejs.
|
|
This parser requires some string-related routines commonly
|
|
provided by a libc implementation.
|
|
|
|
config HTTP_PARSER_URL
|
|
bool "HTTP Parser for URL support"
|
|
help
|
|
This option enables the URI parser library based on source from nodejs.
|
|
This parser requires some string-related routines commonly
|
|
provided by a libc implementation.
|
|
|
|
config HTTP_PARSER_STRICT
|
|
bool "HTTP strict parsing"
|
|
depends on (HTTP_PARSER || HTTP_PARSER_URL)
|
|
help
|
|
This option enables the strict parsing option
|
|
|
|
config HTTP_CLIENT
|
|
bool "HTTP client API [EXPERIMENTAL]"
|
|
select HTTP_PARSER
|
|
select HTTP_PARSER_URL
|
|
select EXPERIMENTAL
|
|
help
|
|
HTTP client API
|
|
|
|
config HTTP_SERVER
|
|
bool "HTTP Server [EXPERIMENTAL]"
|
|
select HTTP_PARSER
|
|
select HTTP_PARSER_URL
|
|
select EXPERIMENTAL
|
|
help
|
|
HTTP1 and HTTP2 server support.
|
|
|
|
if HTTP_SERVER
|
|
|
|
config HTTP_SERVER_STACK_SIZE
|
|
int "HTTP server thread stack size"
|
|
default 3072
|
|
help
|
|
HTTP server thread stack size for processing RX/TX events.
|
|
|
|
config HTTP_SERVER_NUM_SERVICES
|
|
int "Number of HTTP Server Instances"
|
|
default 1
|
|
range 1 100
|
|
help
|
|
This setting determines the number of http services that the server supports.
|
|
|
|
config HTTP_SERVER_MAX_CLIENTS
|
|
int "Max number of HTTP/2 clients"
|
|
default 3
|
|
range 1 100
|
|
help
|
|
This setting determines the maximum number of HTTP/2 clients that the server can handle at once.
|
|
|
|
config HTTP_SERVER_MAX_STREAMS
|
|
int "Max number of HTTP/2 streams"
|
|
default 10
|
|
range 1 100
|
|
help
|
|
This setting determines the maximum number of HTTP/2 streams for each client.
|
|
|
|
config HTTP_SERVER_CLIENT_BUFFER_SIZE
|
|
int "Client Buffer Size"
|
|
default 256
|
|
range 64 1024
|
|
help
|
|
This setting determines the buffer size for each client.
|
|
|
|
config HTTP_SERVER_HUFFMAN_DECODE_BUFFER_SIZE
|
|
int "Size of the buffer used for decoding Huffman-encoded strings"
|
|
default 256
|
|
range 64 1024
|
|
help
|
|
Size of the buffer used for decoding Huffman-encoded strings when
|
|
processing HPACK compressed headers. This effectively limits the
|
|
maximum length of an individual HTTP header supported.
|
|
|
|
config HTTP_SERVER_MAX_URL_LENGTH
|
|
int "Maximum HTTP URL Length"
|
|
default 256
|
|
range 32 2048
|
|
help
|
|
This setting determines the maximum length of the HTTP URL that the server can process.
|
|
|
|
config HTTP_SERVER_MAX_CONTENT_TYPE_LENGTH
|
|
int "Maximum HTTP Content-Type Length"
|
|
default 64
|
|
range 1 128
|
|
help
|
|
This setting determines the maximum length of the HTTP Content-Length field.
|
|
|
|
config HTTP_SERVER_CLIENT_INACTIVITY_TIMEOUT
|
|
int "Client inactivity timeout (seconds)"
|
|
default 10
|
|
range 1 86400
|
|
help
|
|
This timeout specifies maximum time the client may remain inactive
|
|
(i. e. not sending or receiving any data) before the server drops the
|
|
connection.
|
|
|
|
endif
|
|
|
|
# Hidden option to avoid having multiple individual options that are ORed together
|
|
config HTTP
|
|
bool
|
|
depends on (HTTP_PARSER_URL || HTTP_PARSER || HTTP_CLIENT || HTTP_SERVER)
|
|
default y
|
|
|
|
module = NET_HTTP
|
|
module-dep = NET_LOG
|
|
module-str = Log level for HTTP client library
|
|
module-help = Enables HTTP client code to output debug messages.
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
module = NET_HTTP_SERVER
|
|
module-dep = NET_LOG
|
|
module-str = Log level for HTTP server library
|
|
module-help = Enables HTTP server code to output debug messages.
|
|
source "subsys/net/Kconfig.template.log_config.net"
|