1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/proxy
Simon Tatham 5c9a43f478 HTTP proxy: support 'Transfer-encoding: chunked'.
I had a report that the Windows free-as-in-beer proxy tool 'FreeProxy'
didn't work with the new HTTP proxy code, and it turns out that the
first reason why not is that the error-document in its 407 response is
sent via chunked transfer encoding, which is to say, instead of an
up-front Content-length header, you receive a sequence of chunks each
prefixed with a hex length.

(In 0.76, before the rewritten proxy support, we never even noticed
this because we sent Basic auth details up front in our first attempt,
rather than attempting a no-auth connection first and waiting to see
what kind of auth the proxy asks us for. So we'd only ever see a 407
if the auth details were refused - and since 0.76 didn't have
interactive proxy auth prompts, there was nothing we could do at that
point but abort immediately, without attempting to parse the rest of
the 407 at all.)

Now we spot the Transfer-encoding header and successfully parse
chunked transfers. Happily, we don't need to worry about the further
transfer-encodings such as 'gzip', because we're not actually _using_
the error document - we only have to skip over it to find the end of
the HTTP response.

This still doesn't make PuTTY work with FreeProxy, because there are
further problems hiding behind that one, which I'll fix in following
commits.
2022-02-19 12:50:51 +00:00
..
cproxy.c Withdraw support for SHA-512-256 in HTTP Digest. 2021-11-27 11:41:00 +00:00
cproxy.h HTTP proxy: correctly handle multiple auth headers. 2021-12-21 09:36:25 +00:00
http.c HTTP proxy: support 'Transfer-encoding: chunked'. 2022-02-19 12:50:51 +00:00
interactor.c Fix Plink's handling of interactor_announce() blank lines. 2021-11-06 14:48:26 +00:00
local.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
nocproxy.c Withdraw support for SHA-512-256 in HTTP Digest. 2021-11-27 11:41:00 +00:00
noproxy.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
nosshproxy.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
pproxy.c Pass an Interactor to platform_new_connection. 2021-12-22 15:24:58 +00:00
proxy.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
proxy.h Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
socks4.c Reorganise proxy system into coroutines. 2021-11-19 15:09:17 +00:00
socks5.c proxy_socks5_free: fix inadequate smemclr. 2022-01-29 18:24:31 +00:00
socks.h Pull out SOCKS protocol constants into a header. 2021-11-19 15:09:17 +00:00
sshproxy.c sshproxy.c: add missing NULL check. 2022-01-29 18:25:34 +00:00
telnet.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00