@@ -533,4 +533,6 @@ struct wget_http_info {
char *headers;
};
+extern struct wget_http_info wget_info;
+
#endif /* __NET_COMMON_H__ */
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <net-common.h>
void copy_filename(char *dst, const char *src, int size)
{
@@ -11,3 +12,12 @@ void copy_filename(char *dst, const char *src, int size)
*dst++ = *src++;
*dst = '\0';
}
+
+struct wget_http_info wget_info = {
+ .method = WGET_HTTP_METHOD_GET,
+ .file_size = 0,
+ .buffer_size = 0,
+ .set_bootdev = true,
+ .check_buffer_size = false,
+ .headers = NULL,
+};
Declare and define a global struct wget_http_info. The default values are so that wget works as it used to, but they can be changed by an application before issuing an http request using wget, and restored afterwards. This struct is common to legacy wget and lwip wget. Signed-off-by: Adriano Cordova <adrianox@gmail.com> --- include/net-common.h | 2 ++ net/net-common.c | 10 ++++++++++ 2 files changed, 12 insertions(+)