Commit d1675bf3 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Anas Nashif
Browse files

net: http: Remove the old legacy API



There are no internal users for old HTTP API so removing it.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 8dd852dc
Loading
Loading
Loading
Loading
+1078 −4

File changed.

Preview size limit exceeded, changes collapsed.

include/net/http_app.h

deleted100644 → 0
+0 −1092

File deleted.

Preview size limit exceeded, changes collapsed.

include/net/http_legacy.h

deleted100644 → 0
+0 −1244

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −32
Original line number Diff line number Diff line
@@ -1398,37 +1398,6 @@ static char *http_str_output(char *output, int outlen, const char *str, int len)
	return output;
}

#if !defined(CONFIG_HTTP_APP)
static void http_server_cb(struct http_server_ctx *entry,
			   void *user_data)
{
	int *count = user_data;
	static char output[MAX_HTTP_OUTPUT_LEN];

	/* +7 for []:port */
	char addr_local[ADDR_LEN + 7];
	char addr_remote[ADDR_LEN + 7] = "";

	get_addresses(entry->req.net_ctx, addr_local, sizeof(addr_local),
		      addr_remote, sizeof(addr_remote));

	if (*count == 0) {
		printk("        HTTP ctx    Local           \t"
		       "Remote          \tURL\n");
	}

	(*count)++;

	printk("[%2d] %c%c %p  %16s\t%16s\t%s\n",
	       *count, entry->enabled ? 'E' : 'D',
	       entry->is_https ? 'S' : ' ',
	       entry, addr_local, addr_remote,
	       http_str_output(output, sizeof(output) - 1,
			       entry->req.url, entry->req.url_len));
}
#endif

#if defined(CONFIG_HTTP_APP)
static void http_server_cb(struct http_ctx *entry, void *user_data)
{
	int *count = user_data;
@@ -1465,7 +1434,6 @@ static void http_server_cb(struct http_ctx *entry, void *user_data)
				       entry->http.url, entry->http.url_len));
	}
}
#endif /* CONFIG_HTTP_APP */
#endif /* CONFIG_NET_DEBUG_HTTP_CONN && CONFIG_HTTP_SERVER */

int net_shell_cmd_http(int argc, char *argv[])
+3 −8
Original line number Diff line number Diff line
@@ -7,15 +7,10 @@ endif()
zephyr_library_sources_if_kconfig(http_parser.c)
zephyr_library_sources_if_kconfig(http_parser_url.c)

if(CONFIG_HTTP_APP)
  zephyr_library_sources(http_app.c)
zephyr_library_sources(http.c)

  zephyr_library_sources_ifdef(CONFIG_HTTP_SERVER http_app_server.c)
  zephyr_library_sources_ifdef(CONFIG_HTTP_CLIENT http_app_client.c)
else()
zephyr_library_sources_ifdef(CONFIG_HTTP_SERVER http_server.c)
zephyr_library_sources_ifdef(CONFIG_HTTP_CLIENT http_client.c)
endif()

zephyr_link_interface_ifdef(CONFIG_MBEDTLS mbedTLS)
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
Loading