From 9ddf18a490a6e2de409eb74b9dd1899713b25873 Mon Sep 17 00:00:00 2001 From: jacob Date: Sun, 8 Dec 2002 15:32:40 +0000 Subject: [PATCH] Wrong length was causing spurious \0 to be sent during SSH negotiation with HTTP proxy -- fixed. (Also added a "len -= eol" to HTTP header munching, although it has no practical effect.) HTTP proxying now works again, hurrah. git-svn-id: svn://svn.tartarus.org/sgt/putty@2292 cda61777-01e9-0310-a592-d414129be87e --- proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy.c b/proxy.c index c1aab15f..d1f842d6 100644 --- a/proxy.c +++ b/proxy.c @@ -481,7 +481,7 @@ int proxy_http_negotiate (Proxy_Socket p, int change) sk_write(p->sub_socket, buf2, strlen(buf2)); } - sk_write(p->sub_socket, "\r\n", strlen(buf)); + sk_write(p->sub_socket, "\r\n", 2); p->state = 1; return 0; @@ -594,6 +594,7 @@ int proxy_http_negotiate (Proxy_Socket p, int change) { bufchain_consume(&p->pending_input_data, eol); datap += eol; + len -= eol; eol = get_line_end(datap, len); } -- 2.11.0