summaryrefslogtreecommitdiff
path: root/net/lwip/wget.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/lwip/wget.c')
-rw-r--r--net/lwip/wget.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/lwip/wget.c b/net/lwip/wget.c
index b76f6c0f1d9..14f27d42998 100644
--- a/net/lwip/wget.c
+++ b/net/lwip/wget.c
@@ -354,7 +354,7 @@ static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri)
int wget_do_request(ulong dst_addr, char *uri)
{
- eth_set_current();
+ net_lwip_set_current();
if (!wget_info)
wget_info = &default_wget_info;
@@ -433,10 +433,15 @@ bool wget_validate_uri(char *uri)
if (!strncmp(uri, "http://", strlen("http://"))) {
prefix_len = strlen("http://");
- } else if (!strncmp(uri, "https://", strlen("https://"))) {
- prefix_len = strlen("https://");
+ } else if (CONFIG_IS_ENABLED(WGET_HTTPS)) {
+ if (!strncmp(uri, "https://", strlen("https://"))) {
+ prefix_len = strlen("https://");
+ } else {
+ log_err("only http(s):// is supported\n");
+ return false;
+ }
} else {
- log_err("only http(s):// is supported\n");
+ log_err("only http:// is supported\n");
return false;
}