Skip to content

Commit d1675bf

Browse files
jukkarAnas Nashif
authored andcommitted
net: http: Remove the old legacy API
There are no internal users for old HTTP API so removing it. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 8dd852d commit d1675bf

File tree

11 files changed

+1975
-6808
lines changed

11 files changed

+1975
-6808
lines changed

include/net/http.h

Lines changed: 1078 additions & 4 deletions
Large diffs are not rendered by default.

include/net/http_app.h

Lines changed: 0 additions & 1092 deletions
This file was deleted.

include/net/http_legacy.h

Lines changed: 0 additions & 1244 deletions
This file was deleted.

subsys/net/ip/net_shell.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,37 +1398,6 @@ static char *http_str_output(char *output, int outlen, const char *str, int len)
13981398
return output;
13991399
}
14001400

1401-
#if !defined(CONFIG_HTTP_APP)
1402-
static void http_server_cb(struct http_server_ctx *entry,
1403-
void *user_data)
1404-
{
1405-
int *count = user_data;
1406-
static char output[MAX_HTTP_OUTPUT_LEN];
1407-
1408-
/* +7 for []:port */
1409-
char addr_local[ADDR_LEN + 7];
1410-
char addr_remote[ADDR_LEN + 7] = "";
1411-
1412-
get_addresses(entry->req.net_ctx, addr_local, sizeof(addr_local),
1413-
addr_remote, sizeof(addr_remote));
1414-
1415-
if (*count == 0) {
1416-
printk(" HTTP ctx Local \t"
1417-
"Remote \tURL\n");
1418-
}
1419-
1420-
(*count)++;
1421-
1422-
printk("[%2d] %c%c %p %16s\t%16s\t%s\n",
1423-
*count, entry->enabled ? 'E' : 'D',
1424-
entry->is_https ? 'S' : ' ',
1425-
entry, addr_local, addr_remote,
1426-
http_str_output(output, sizeof(output) - 1,
1427-
entry->req.url, entry->req.url_len));
1428-
}
1429-
#endif
1430-
1431-
#if defined(CONFIG_HTTP_APP)
14321401
static void http_server_cb(struct http_ctx *entry, void *user_data)
14331402
{
14341403
int *count = user_data;
@@ -1465,7 +1434,6 @@ static void http_server_cb(struct http_ctx *entry, void *user_data)
14651434
entry->http.url, entry->http.url_len));
14661435
}
14671436
}
1468-
#endif /* CONFIG_HTTP_APP */
14691437
#endif /* CONFIG_NET_DEBUG_HTTP_CONN && CONFIG_HTTP_SERVER */
14701438

14711439
int net_shell_cmd_http(int argc, char *argv[])

subsys/net/lib/http/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ endif()
77
zephyr_library_sources_if_kconfig(http_parser.c)
88
zephyr_library_sources_if_kconfig(http_parser_url.c)
99

10-
if(CONFIG_HTTP_APP)
11-
zephyr_library_sources(http_app.c)
10+
zephyr_library_sources(http.c)
1211

13-
zephyr_library_sources_ifdef(CONFIG_HTTP_SERVER http_app_server.c)
14-
zephyr_library_sources_ifdef(CONFIG_HTTP_CLIENT http_app_client.c)
15-
else()
16-
zephyr_library_sources_ifdef(CONFIG_HTTP_SERVER http_server.c)
17-
zephyr_library_sources_ifdef(CONFIG_HTTP_CLIENT http_client.c)
18-
endif()
12+
zephyr_library_sources_ifdef(CONFIG_HTTP_SERVER http_server.c)
13+
zephyr_library_sources_ifdef(CONFIG_HTTP_CLIENT http_client.c)
1914

2015
zephyr_link_interface_ifdef(CONFIG_MBEDTLS mbedTLS)
2116
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)

subsys/net/lib/http/Kconfig

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ config HTTP
1111

1212
if HTTP
1313

14-
config HTTP_APP
15-
bool "Use new HTTP API built on top of net-app API"
16-
default y
17-
18-
if HTTP_APP
19-
2014
config HTTP_SERVER
2115
bool "HTTP server support"
2216
default n
@@ -60,60 +54,6 @@ config HTTP_SERVER_CONNECTIONS
6054
served at a time, so set CONFIG_NET_APP_SERVER_NUM_CONN and
6155
CONFIG_NET_TCP_BACKLOG_SIZE to 1 in that case.
6256

63-
endif # HTTP_APP
64-
65-
if !HTTP_APP
66-
67-
config HTTP_SERVER
68-
bool "HTTP server support"
69-
default n
70-
select HTTP_PARSER
71-
select HTTP_PARSER_URL
72-
help
73-
Enables HTTP server routines.
74-
75-
config HTTP_CLIENT
76-
bool "HTTP client support"
77-
default n
78-
select HTTP_PARSER
79-
select HTTP_PARSER_URL
80-
help
81-
Enables HTTP client routines.
82-
83-
config HTTP_HEADER_FIELD_ITEMS
84-
int "HTTP header field max number of items"
85-
depends on HTTP_SERVER
86-
default 8
87-
help
88-
Number of HTTP header field items that an HTTP server
89-
application will handle
90-
91-
config HTTPS
92-
bool "HTTPS support"
93-
default n
94-
select MBEDTLS
95-
help
96-
Enables HTTPS support.
97-
98-
config HTTPS_STACK_SIZE
99-
int "HTTPS thread stack size"
100-
default 8192
101-
depends on HTTPS
102-
help
103-
HTTPS thread stack size. The mbedtls routines will use this stack
104-
thus it is by default very large.
105-
106-
config HTTP_SERVER_CONNECTIONS
107-
int "Max number of concurrent HTTP server connections"
108-
default NET_MAX_CONTEXTS
109-
depends on HTTP_SERVER
110-
help
111-
This value determines how many simultaneous HTTP connections the
112-
HTTP server can serve. Note that only 1 HTTPS connection can be
113-
served at a time.
114-
115-
endif # !HTTP_APP
116-
11757
config HTTP_SERVER_NUM_URLS
11858
int "Max number of URLs that the HTTP server will handle"
11959
default 8
File renamed without changes.

0 commit comments

Comments
 (0)