On Fri, 2009-12-18 at 11:43 +1300, P?l Dorogi wrote: > > + buflen = read(ssl_sock, buf, MAX_BUF_LEN); > + > + if ((buflen < 0) || strncmp(buf, "HTTP/1.1 200", 12)) { That isn't quite right either -- you have to be able to do multiple reads until you have the response and the trailing \r\n\r\n. And are you really refusing to deal with HTTP 1.0 proxies? Oh, and shouldn't IPv6 literal addresses be wrapped in [] in the connect request? -- dwmw2