diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-04-10 12:00:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-04-10 12:00:20 -0400 |
commit | dd3f4f1bdbc06137b36181fd3e958de5b8bc4a4e (patch) | |
tree | d60bee15aa59345c9de3d5714237ee4783f42340 | |
parent | 439fc704f14af50364bee5d3cd91a2bca0d8611a (diff) | |
download | tor-dd3f4f1bdbc06137b36181fd3e958de5b8bc4a4e.tar.gz tor-dd3f4f1bdbc06137b36181fd3e958de5b8bc4a4e.zip |
Include a Host: header with any HTTP/1.1 proxy request
Bugfix on 0.2.2.1-alpha, which added the orginal HTTP proxy
authentication code. Fix for bug 5593.
-rw-r--r-- | changes/bug5593 | 3 | ||||
-rw-r--r-- | src/or/connection.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/changes/bug5593 b/changes/bug5593 new file mode 100644 index 0000000000..358e8de60d --- /dev/null +++ b/changes/bug5593 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - When sending an HTTP/1.1 proxy request, include a Host header. + Fixes bug 5593; bugfix on 0.2.2.1-alpha. diff --git a/src/or/connection.c b/src/or/connection.c index 36e192a767..dc75601ab4 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1465,10 +1465,13 @@ connection_proxy_connect(connection_t *conn, int type) } if (base64_authenticator) { + const char *addr = fmt_addr(&conn->addr); tor_snprintf(buf, sizeof(buf), "CONNECT %s:%d HTTP/1.1\r\n" + "Host: %s:%d\r\n" "Proxy-Authorization: Basic %s\r\n\r\n", - fmt_addr(&conn->addr), - conn->port, base64_authenticator); + addr, conn->port, + addr, conn->port, + base64_authenticator); tor_free(base64_authenticator); } else { tor_snprintf(buf, sizeof(buf), "CONNECT %s:%d HTTP/1.0\r\n\r\n", |