summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2015-12-24 13:58:31 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2015-12-24 13:58:31 +0000
commit49ab3cfd267a65cb64ef323ac9ca0518966661ce (patch)
tree67d01871d46c39a3d68e1ed1c52165fd647e48c9 /usr.sbin
parent33719d257c5548a6147c9ac2b45a8af82f85b918 (diff)
revert check_tcp rev 1.41 by yasuoka@
This part was not meant to be commited, only the bits in check_icmp.c and relayd.h are ok. ok yasuoka@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/relayd/check_tcp.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/usr.sbin/relayd/check_tcp.c b/usr.sbin/relayd/check_tcp.c
index b1cde96535c..0b19d47e6f2 100644
--- a/usr.sbin/relayd/check_tcp.c
+++ b/usr.sbin/relayd/check_tcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check_tcp.c,v 1.48 2015/11/28 09:52:07 reyk Exp $ */
+/* $OpenBSD: check_tcp.c,v 1.49 2015/12/24 13:58:30 benno Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -41,7 +41,6 @@ void tcp_close(struct ctl_tcp_event *, int);
void tcp_send_req(int, short, void *);
void tcp_read_buf(int, short, void *);
-int check_http_resphead(struct ctl_tcp_event *);
int check_http_code(struct ctl_tcp_event *);
int check_http_digest(struct ctl_tcp_event *);
int check_send_expect(struct ctl_tcp_event *);
@@ -159,7 +158,7 @@ tcp_host_up(struct ctl_tcp_event *cte)
hce_notify_done(cte->host, HCE_TCP_CONNECT_OK);
return;
case CHECK_HTTP_CODE:
- cte->validate_read = check_http_resphead;
+ cte->validate_read = NULL;
cte->validate_close = check_http_code;
break;
case CHECK_HTTP_DIGEST:
@@ -301,24 +300,6 @@ check_send_expect(struct ctl_tcp_event *cte)
}
int
-check_http_resphead(struct ctl_tcp_event *cte)
-{
- int i, siz;
-
- /* checks whether the buffer contains the response header */
- siz = ibuf_size(cte->buf);
- for (i = 0; i <= siz - 4; i++) {
- if (cte->buf->buf[i] == '\r' &&
- cte->buf->buf[i + 1] == '\n' &&
- cte->buf->buf[i + 2] == '\r' &&
- cte->buf->buf[i + 3] == '\n')
- return (0);
- }
-
- return (1);
-}
-
-int
check_http_code(struct ctl_tcp_event *cte)
{
char *head;