From ef21d54c7ef3086090860a6d7fec498a4812e05f Mon Sep 17 00:00:00 2001 From: ray <> Date: Mon, 25 Sep 2006 04:51:20 +0000 Subject: Also accept "HTTP/1.1 200" as a success response. OK djm@. --- src/usr.bin/nc/socks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr.bin/nc/socks.c b/src/usr.bin/nc/socks.c index daed99712e..da7bd0c60e 100644 --- a/src/usr.bin/nc/socks.c +++ b/src/usr.bin/nc/socks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.16 2006/01/25 23:21:37 djm Exp $ */ +/* $OpenBSD: socks.c,v 1.17 2006/09/25 04:51:20 ray Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -307,7 +307,8 @@ socks_connect(const char *host, const char *port, } close(proxyfd); goto again; - } else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0) + } else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0 && + strncmp(buf, "HTTP/1.1 200 ", 12) != 0) errx(1, "Proxy error: \"%s\"", buf); /* Headers continue until we hit an empty line */ -- cgit v1.2.3-55-g6feb