summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-09-25 04:51:21 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-09-25 04:51:21 +0000
commit5d3ea71defe95d53efcf6d49ac7d8936bd7d7dba (patch)
tree234c9e2975c6ea51cd7a5eb66e03140757f9e304 /usr.bin
parentc04e40c76192c4a15cd217870d76e28fc2c661f2 (diff)
Also accept "HTTP/1.1 200" as a success response.
OK djm@.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nc/socks.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c
index daed99712e3..da7bd0c60e6 100644
--- a/usr.bin/nc/socks.c
+++ b/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 */