wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Connection fails with HTTP/1.0 proxies (#666)


From: Brandon Maier (@SoldierC4)
Subject: Re: wget2 | Connection fails with HTTP/1.0 proxies (#666)
Date: Tue, 16 Jul 2024 14:53:21 +0000



Brandon Maier commented on a discussion: 
https://gitlab.com/gnuwget/wget2/-/issues/666#note_2002037243


I built and tested the change. It does connect to our old proxy with this 
change!

> I'd additionally allow HTTP/1.0 200 responses here.

The URL you included and the URL in my original description are the same. If 
there is another place in the codebase that should be updated let me know and I 
can test that as well.

Here is the patch file for the change.

```
>From d2fb78b2f9160c582a7181e5c765ccbd895f7802 Mon Sep 17 00:00:00 2001
From: Brandon Maier <brandon.maier@collins.com>
Date: Tue, 16 Jul 2024 14:45:51 +0000
Subject: [PATCH] Support old proxies that reply with HTTP/1.0

---
 libwget/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libwget/http.c b/libwget/http.c
index 55150208..27b384eb 100644
--- a/libwget/http.c
+++ b/libwget/http.c
@@ -477,7 +477,7 @@ static int establish_proxy_connect(wget_tcp *tcp, const 
char *host, uint16_t por
        while (nbytes > 0 && c_isspace(sbuf[--nbytes]))
                sbuf[nbytes] = 0;

-       if (wget_strncasecmp_ascii(sbuf, "HTTP/1.1 200", 12)) {
+       if (wget_strncasecmp_ascii(sbuf, "HTTP/1.1 200", 12) && 
wget_strncasecmp_ascii(sbuf, "HTTP/1.0 200", 12)) {
                error_printf(_("Proxy connection failed with: %s\n"), sbuf);
                return WGET_E_CONNECT;
        }
--
2.45.2
```

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/issues/666#note_2002037243
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]