From 627c21ae27c54851823ae3c0280c9643c9d51d25 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Mon, 10 Oct 2022 12:58:30 -0400 Subject: [PATCH 1/4] include: net: http: move http methods to separate header Previously, HTTP method enumerations were only defined within the `http_parser.h`, which may not be ideal for all use cases. This commit moves the `enum http_method` definition to a dedicated header in a dedicated `http` subdirectory. Signed-off-by: Christopher Friedt --- include/zephyr/net/http/method.h | 70 ++++++++++++++++++++++++++++++++ include/zephyr/net/http_parser.h | 37 +---------------- 2 files changed, 71 insertions(+), 36 deletions(-) create mode 100644 include/zephyr/net/http/method.h diff --git a/include/zephyr/net/http/method.h b/include/zephyr/net/http/method.h new file mode 100644 index 0000000000000..a45c555e97b97 --- /dev/null +++ b/include/zephyr/net/http/method.h @@ -0,0 +1,70 @@ +/** @file + * @brief HTTP request methods + */ + +/* + * Copyright (c) 2022 Meta + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_NET_HTTP_METHOD_H_ +#define ZEPHYR_INCLUDE_NET_HTTP_METHOD_H_ + +/** + * @brief HTTP request methods + * @defgroup http_methods HTTP request methods + * @ingroup networking + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @brief HTTP Request Methods */ +enum http_method { + HTTP_DELETE = 0, /**< DELETE */ + HTTP_GET = 1, /**< GET */ + HTTP_HEAD = 2, /**< HEAD */ + HTTP_POST = 3, /**< POST */ + HTTP_PUT = 4, /**< PUT */ + HTTP_CONNECT = 5, /**< CONNECT */ + HTTP_OPTIONS = 6, /**< OPTIONS */ + HTTP_TRACE = 7, /**< TRACE */ + HTTP_COPY = 8, /**< COPY */ + HTTP_LOCK = 9, /**< LOCK */ + HTTP_MKCOL = 10, /**< MKCOL */ + HTTP_MOVE = 11, /**< MOVE */ + HTTP_PROPFIND = 12, /**< PROPFIND */ + HTTP_PROPPATCH = 13, /**< PROPPATCH */ + HTTP_SEARCH = 14, /**< SEARCH */ + HTTP_UNLOCK = 15, /**< UNLOCK */ + HTTP_BIND = 16, /**< BIND */ + HTTP_REBIND = 17, /**< REBIND */ + HTTP_UNBIND = 18, /**< UNBIND */ + HTTP_ACL = 19, /**< ACL */ + HTTP_REPORT = 20, /**< REPORT */ + HTTP_MKACTIVITY = 21, /**< MKACTIVITY */ + HTTP_CHECKOUT = 22, /**< CHECKOUT */ + HTTP_MERGE = 23, /**< MERGE */ + HTTP_MSEARCH = 24, /**< MSEARCH */ + HTTP_NOTIFY = 25, /**< NOTIFY */ + HTTP_SUBSCRIBE = 26, /**< SUBSCRIBE */ + HTTP_UNSUBSCRIBE = 27, /**< UNSUBSCRIBE */ + HTTP_PATCH = 28, /**< PATCH */ + HTTP_PURGE = 29, /**< PURGE */ + HTTP_MKCALENDAR = 30, /**< MKCALENDAR */ + HTTP_LINK = 31, /**< LINK */ + HTTP_UNLINK = 32, /**< UNLINK */ +}; + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif diff --git a/include/zephyr/net/http_parser.h b/include/zephyr/net/http_parser.h index 28a5d8525b5f3..3604e18bafc80 100644 --- a/include/zephyr/net/http_parser.h +++ b/include/zephyr/net/http_parser.h @@ -45,6 +45,7 @@ typedef unsigned __int64 uint64_t; #include #include #endif +#include #include #include @@ -89,42 +90,6 @@ typedef int (*http_data_cb)(struct http_parser *, const char *at, size_t length); typedef int (*http_cb)(struct http_parser *); -enum http_method { - HTTP_DELETE = 0, - HTTP_GET = 1, - HTTP_HEAD = 2, - HTTP_POST = 3, - HTTP_PUT = 4, - HTTP_CONNECT = 5, - HTTP_OPTIONS = 6, - HTTP_TRACE = 7, - HTTP_COPY = 8, - HTTP_LOCK = 9, - HTTP_MKCOL = 10, - HTTP_MOVE = 11, - HTTP_PROPFIND = 12, - HTTP_PROPPATCH = 13, - HTTP_SEARCH = 14, - HTTP_UNLOCK = 15, - HTTP_BIND = 16, - HTTP_REBIND = 17, - HTTP_UNBIND = 18, - HTTP_ACL = 19, - HTTP_REPORT = 20, - HTTP_MKACTIVITY = 21, - HTTP_CHECKOUT = 22, - HTTP_MERGE = 23, - HTTP_MSEARCH = 24, - HTTP_NOTIFY = 25, - HTTP_SUBSCRIBE = 26, - HTTP_UNSUBSCRIBE = 27, - HTTP_PATCH = 28, - HTTP_PURGE = 29, - HTTP_MKCALENDAR = 30, - HTTP_LINK = 31, - HTTP_UNLINK = 32 -}; - enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH }; /* Flag values for http_parser.flags field */ From bb1728cdd07ba22efd78262fea2cf5640d23e633 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Mon, 10 Oct 2022 13:03:24 -0400 Subject: [PATCH 2/4] scripts: net: add enumerate_http_status.py Add a script to extract HTTP status values and format them in a way that is both human readable and machine parseable. Each line of output is of the form: ``` HTTP_{key}_{upper_val} = {key}, /**< val */ ``` Signed-off-by: Christopher Friedt --- scripts/net/enumerate_http_status.py | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 scripts/net/enumerate_http_status.py diff --git a/scripts/net/enumerate_http_status.py b/scripts/net/enumerate_http_status.py new file mode 100755 index 0000000000000..231c01e62764f --- /dev/null +++ b/scripts/net/enumerate_http_status.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +# Copyright(c) 2022 Meta +# SPDX-License-Identifier: Apache-2.0 + +"""Format HTTP Status codes for use in a C header + +This script extracts HTTP status codes from mozilla.org +and formats them to fit inside of a C enum along with +comments. + +The output may appear somewhat redundant but it strives +to +a) be human readable +b) eliminate the need to look up status manually, +c) be machine parseable for table generation + +The output is sorted for convenience. + +Usage: + ./scripts/net/enumerate_http_status.py + HTTP_100_CONTINUE = 100, /**< Continue */ + ... + HTTP_418_IM_A_TEAPOT = 418, /**< I'm a teapot */ + ... + HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511, /**< Network Authentication Required */ +""" + +from lxml import html +import requests +import re + +page = requests.get('https://developer.mozilla.org/en-US/docs/Web/HTTP/Status') +tree = html.fromstring(page.content) + +codes = tree.xpath('//code/text()') + +codes2 = {} +for c in codes: + if re.match('[0-9][0-9][0-9] [a-zA-Z].*', c): + key = int(c[0:3]) + val = c[4:] + codes2[key] = val + +keys = sorted(codes2.keys()) +for key in keys: + val = codes2[key] + enum_head = 'HTTP' + enum_body = f'{key}' + enum_tail = val.upper().replace(' ', '_').replace("'", '').replace('-', '_') + enum_label = '_'.join([enum_head, enum_body, enum_tail]) + comment = f'/**< {val} */' + + print(f'{enum_label} = {key}, {comment}') From a7947968be8789de78c7b494c8c28d8d07921d02 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Mon, 10 Oct 2022 13:22:07 -0400 Subject: [PATCH 3/4] include: net: http: define http response status codes Provide a common header enumerating HTTP response status codes. Signed-off-by: Christopher Friedt --- include/zephyr/net/http/status.h | 108 +++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 include/zephyr/net/http/status.h diff --git a/include/zephyr/net/http/status.h b/include/zephyr/net/http/status.h new file mode 100644 index 0000000000000..17b3394ab1c94 --- /dev/null +++ b/include/zephyr/net/http/status.h @@ -0,0 +1,108 @@ +/** @file + * @brief HTTP response status codes + */ + +/* + * Copyright (c) 2022 Meta + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_NET_HTTP_STATUS_H_ +#define ZEPHYR_INCLUDE_NET_HTTP_STATUS_H_ + +/** + * @brief HTTP response status codes + * @defgroup http_status_codes HTTP response status codes + * @ingroup networking + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief HTTP response status codes + * + * @note HTTP response status codes are subject to IANA approval. + * + * @see Hypertext Transfer Protocol (HTTP) Status Code Registry + * @see RFC9110 + * @see HTTP response status codes + */ +enum http_status { + HTTP_100_CONTINUE = 100, /**< Continue */ + HTTP_101_SWITCHING_PROTOCOLS = 101, /**< Switching Protocols */ + HTTP_102_PROCESSING = 102, /**< Processing */ + HTTP_103_EARLY_HINTS = 103, /**< Early Hints */ + HTTP_200_OK = 200, /**< OK */ + HTTP_201_CREATED = 201, /**< Created */ + HTTP_202_ACCEPTED = 202, /**< Accepted */ + HTTP_203_NON_AUTHORITATIVE_INFORMATION = 203, /**< Non-Authoritative Information */ + HTTP_204_NO_CONTENT = 204, /**< No Content */ + HTTP_205_RESET_CONTENT = 205, /**< Reset Content */ + HTTP_206_PARTIAL_CONTENT = 206, /**< Partial Content */ + HTTP_207_MULTI_STATUS = 207, /**< Multi-Status */ + HTTP_208_ALREADY_REPORTED = 208, /**< Already Reported */ + HTTP_226_IM_USED = 226, /**< IM Used */ + HTTP_300_MULTIPLE_CHOICES = 300, /**< Multiple Choices */ + HTTP_301_MOVED_PERMANENTLY = 301, /**< Moved Permanently */ + HTTP_302_FOUND = 302, /**< Found */ + HTTP_303_SEE_OTHER = 303, /**< See Other */ + HTTP_304_NOT_MODIFIED = 304, /**< Not Modified */ + HTTP_305_USE_PROXY = 305, /**< Use Proxy */ + HTTP_306_UNUSED = 306, /**< unused */ + HTTP_307_TEMPORARY_REDIRECT = 307, /**< Temporary Redirect */ + HTTP_308_PERMANENT_REDIRECT = 308, /**< Permanent Redirect */ + HTTP_400_BAD_REQUEST = 400, /**< Bad Request */ + HTTP_401_UNAUTHORIZED = 401, /**< Unauthorized */ + HTTP_402_PAYMENT_REQUIRED = 402, /**< Payment Required */ + HTTP_403_FORBIDDEN = 403, /**< Forbidden */ + HTTP_404_NOT_FOUND = 404, /**< Not Found */ + HTTP_405_METHOD_NOT_ALLOWED = 405, /**< Method Not Allowed */ + HTTP_406_NOT_ACCEPTABLE = 406, /**< Not Acceptable */ + HTTP_407_PROXY_AUTHENTICATION_REQUIRED = 407, /**< Proxy Authentication Required */ + HTTP_408_REQUEST_TIMEOUT = 408, /**< Request Timeout */ + HTTP_409_CONFLICT = 409, /**< Conflict */ + HTTP_410_GONE = 410, /**< Gone */ + HTTP_411_LENGTH_REQUIRED = 411, /**< Length Required */ + HTTP_412_PRECONDITION_FAILED = 412, /**< Precondition Failed */ + HTTP_413_PAYLOAD_TOO_LARGE = 413, /**< Payload Too Large */ + HTTP_414_URI_TOO_LONG = 414, /**< URI Too Long */ + HTTP_415_UNSUPPORTED_MEDIA_TYPE = 415, /**< Unsupported Media Type */ + HTTP_416_RANGE_NOT_SATISFIABLE = 416, /**< Range Not Satisfiable */ + HTTP_417_EXPECTATION_FAILED = 417, /**< Expectation Failed */ + HTTP_418_IM_A_TEAPOT = 418, /**< I'm a teapot */ + HTTP_421_MISDIRECTED_REQUEST = 421, /**< Misdirected Request */ + HTTP_422_UNPROCESSABLE_ENTITY = 422, /**< Unprocessable Entity */ + HTTP_423_LOCKED = 423, /**< Locked */ + HTTP_424_FAILED_DEPENDENCY = 424, /**< Failed Dependency */ + HTTP_425_TOO_EARLY = 425, /**< Too Early */ + HTTP_426_UPGRADE_REQUIRED = 426, /**< Upgrade Required */ + HTTP_428_PRECONDITION_REQUIRED = 428, /**< Precondition Required */ + HTTP_429_TOO_MANY_REQUESTS = 429, /**< Too Many Requests */ + HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431, /**< Request Header Fields Too Large */ + HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS = 451, /**< Unavailable For Legal Reasons */ + HTTP_500_INTERNAL_SERVER_ERROR = 500, /**< Internal Server Error */ + HTTP_501_NOT_IMPLEMENTED = 501, /**< Not Implemented */ + HTTP_502_BAD_GATEWAY = 502, /**< Bad Gateway */ + HTTP_503_SERVICE_UNAVAILABLE = 503, /**< Service Unavailable */ + HTTP_504_GATEWAY_TIMEOUT = 504, /**< Gateway Timeout */ + HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505, /**< HTTP Version Not Supported */ + HTTP_506_VARIANT_ALSO_NEGOTIATES = 506, /**< Variant Also Negotiates */ + HTTP_507_INSUFFICIENT_STORAGE = 507, /**< Insufficient Storage */ + HTTP_508_LOOP_DETECTED = 508, /**< Loop Detected */ + HTTP_510_NOT_EXTENDED = 510, /**< Not Extended */ + HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511, /**< Network Authentication Required */ +}; + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif From 449e00f26f3362e61b801801073bf6b367983c28 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Tue, 11 Oct 2022 18:53:39 -0400 Subject: [PATCH 4/4] include: net: http: rename http_x.h http/x.h Some minor housekeeping prior to adding an http server implementation. There are already a number of http headers and that number will likely increase with subsequent work. Moving them into a common directory cleans up the `include/net` directory a bit. Signed-off-by: Christopher Friedt --- include/zephyr/net/{http_client.h => http/client.h} | 2 +- include/zephyr/net/{http_parser.h => http/parser.h} | 4 ++-- .../zephyr/net/{http_parser_state.h => http/parser_state.h} | 0 include/zephyr/net/{http_parser_url.h => http/parser_url.h} | 2 +- include/zephyr/net/websocket.h | 4 ++-- samples/net/cloud/tagoio_http_post/src/main.c | 2 +- samples/net/cloud/tagoio_http_post/src/sockets.c | 2 +- samples/net/sockets/http_client/src/main.c | 2 +- subsys/mgmt/hawkbit/hawkbit.c | 2 +- subsys/net/lib/http/http_client.c | 2 +- subsys/net/lib/http/http_parser.c | 2 +- subsys/net/lib/http/http_parser_url.c | 2 +- subsys/net/lib/lwm2m/lwm2m_engine.c | 2 +- subsys/net/lib/lwm2m/lwm2m_message_handling.c | 2 +- subsys/net/lib/lwm2m/lwm2m_observation.c | 2 +- subsys/net/lib/lwm2m/lwm2m_pull_context.c | 2 +- subsys/net/lib/websocket/websocket.c | 2 +- tests/net/lib/http_header_fields/src/main.c | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) rename include/zephyr/net/{http_client.h => http/client.h} (99%) rename include/zephyr/net/{http_parser.h => http/parser.h} (99%) rename include/zephyr/net/{http_parser_state.h => http/parser_state.h} (100%) rename include/zephyr/net/{http_parser_url.h => http/parser_url.h} (98%) diff --git a/include/zephyr/net/http_client.h b/include/zephyr/net/http/client.h similarity index 99% rename from include/zephyr/net/http_client.h rename to include/zephyr/net/http/client.h index f00895e73313a..22ea242a51791 100644 --- a/include/zephyr/net/http_client.h +++ b/include/zephyr/net/http/client.h @@ -22,7 +22,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/http_parser.h b/include/zephyr/net/http/parser.h similarity index 99% rename from include/zephyr/net/http_parser.h rename to include/zephyr/net/http/parser.h index 3604e18bafc80..38006f5e98551 100644 --- a/include/zephyr/net/http_parser.h +++ b/include/zephyr/net/http/parser.h @@ -46,8 +46,8 @@ typedef unsigned __int64 uint64_t; #include #endif #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/http_parser_state.h b/include/zephyr/net/http/parser_state.h similarity index 100% rename from include/zephyr/net/http_parser_state.h rename to include/zephyr/net/http/parser_state.h diff --git a/include/zephyr/net/http_parser_url.h b/include/zephyr/net/http/parser_url.h similarity index 98% rename from include/zephyr/net/http_parser_url.h rename to include/zephyr/net/http/parser_url.h index cba9ddc44624b..e795e18ab3a7a 100644 --- a/include/zephyr/net/http_parser_url.h +++ b/include/zephyr/net/http/parser_url.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/websocket.h b/include/zephyr/net/websocket.h index ee45dcdce498c..5d0301c03162c 100644 --- a/include/zephyr/net/websocket.h +++ b/include/zephyr/net/websocket.h @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/samples/net/cloud/tagoio_http_post/src/main.c b/samples/net/cloud/tagoio_http_post/src/main.c index b24d91d45c603..9c0b1ce3572d6 100644 --- a/samples/net/cloud/tagoio_http_post/src/main.c +++ b/samples/net/cloud/tagoio_http_post/src/main.c @@ -9,7 +9,7 @@ LOG_MODULE_REGISTER(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/samples/net/cloud/tagoio_http_post/src/sockets.c b/samples/net/cloud/tagoio_http_post/src/sockets.c index adbfe2251e547..b7b278c033127 100644 --- a/samples/net/cloud/tagoio_http_post/src/sockets.c +++ b/samples/net/cloud/tagoio_http_post/src/sockets.c @@ -12,7 +12,7 @@ LOG_MODULE_DECLARE(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL); #include #include #include -#include +#include #include "sockets.h" diff --git a/samples/net/sockets/http_client/src/main.c b/samples/net/sockets/http_client/src/main.c index 28934c0c367bd..43a7c3798dcd0 100644 --- a/samples/net/sockets/http_client/src/main.c +++ b/samples/net/sockets/http_client/src/main.c @@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(net_http_client_sample, LOG_LEVEL_DBG); #include #include #include -#include +#include #include "ca_certificate.h" diff --git a/subsys/mgmt/hawkbit/hawkbit.c b/subsys/mgmt/hawkbit/hawkbit.c index 2ea2f3cbff951..a4b1a8d45480b 100644 --- a/subsys/mgmt/hawkbit/hawkbit.c +++ b/subsys/mgmt/hawkbit/hawkbit.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(hawkbit, CONFIG_HAWKBIT_LOG_LEVEL); #include #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/http/http_client.c b/subsys/net/lib/http/http_client.c index 64954d1146a4d..160250a47e43c 100644 --- a/subsys/net/lib/http/http_client.c +++ b/subsys/net/lib/http/http_client.c @@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(net_http, CONFIG_NET_HTTP_LOG_LEVEL); #include #include -#include +#include #include "net_private.h" diff --git a/subsys/net/lib/http/http_parser.c b/subsys/net/lib/http/http_parser.c index 8626b101cda49..7622a2556ef25 100644 --- a/subsys/net/lib/http/http_parser.c +++ b/subsys/net/lib/http/http_parser.c @@ -23,7 +23,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/subsys/net/lib/http/http_parser_url.c b/subsys/net/lib/http/http_parser_url.c index 84a41540ebaf3..a03c209b95b4a 100644 --- a/subsys/net/lib/http/http_parser_url.c +++ b/subsys/net/lib/http/http_parser_url.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #ifndef BIT_AT diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index 18eaa97565575..6ad1423dc66bd 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_message_handling.c b/subsys/net/lib/lwm2m/lwm2m_message_handling.c index b933c3f838ae6..5bc5e2f4bbd95 100644 --- a/subsys/net/lib/lwm2m/lwm2m_message_handling.c +++ b/subsys/net/lib/lwm2m/lwm2m_message_handling.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_observation.c b/subsys/net/lib/lwm2m/lwm2m_observation.c index 171d705b3ee36..6157df17ae696 100644 --- a/subsys/net/lib/lwm2m/lwm2m_observation.c +++ b/subsys/net/lib/lwm2m/lwm2m_observation.c @@ -30,7 +30,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_pull_context.c b/subsys/net/lib/lwm2m/lwm2m_pull_context.c index 1d663eb612574..8bfe3da747380 100644 --- a/subsys/net/lib/lwm2m/lwm2m_pull_context.c +++ b/subsys/net/lib/lwm2m/lwm2m_pull_context.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include "lwm2m_pull_context.h" diff --git a/subsys/net/lib/websocket/websocket.c b/subsys/net/lib/websocket/websocket.c index 6c11fc2db55e5..2c7d5c0e2530a 100644 --- a/subsys/net/lib/websocket/websocket.c +++ b/subsys/net/lib/websocket/websocket.c @@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(net_websocket, CONFIG_NET_WEBSOCKET_LOG_LEVEL); #else #include #endif -#include +#include #include #include diff --git a/tests/net/lib/http_header_fields/src/main.c b/tests/net/lib/http_header_fields/src/main.c index 02b9fd9b0d91b..19b6320647c3e 100644 --- a/tests/net/lib/http_header_fields/src/main.c +++ b/tests/net/lib/http_header_fields/src/main.c @@ -19,7 +19,7 @@ * IN THE SOFTWARE. */ -#include +#include #include #include