summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2009-04-17 09:37:26 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2009-04-17 09:37:26 +0000
commit687e2e4ca736036c4cc5f86b7d3df7e11e6ffb89 (patch)
tree42bf2959a2df55d3dd5144c6c0c54c475be68589
parent394224fb955692f3460068ca21d5ebb2e2172aa2 (diff)
add "Connection: close" to HTTP check headers to deconfuse HTTP/1.1
servers claiming keepalive sessions. From Camiel Dobbelaar
-rw-r--r--usr.sbin/relayd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 09e99fb082f..c8227685918 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.131 2009/04/02 14:30:51 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.132 2009/04/17 09:37:25 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -205,7 +205,8 @@ hostname : /* empty */ {
fatal("calloc");
}
| HOST STRING {
- if (asprintf(&$$, "Host: %s\r\n", $2) == -1)
+ if (asprintf(&$$, "Host: %s\r\nConnection: close\r\n",
+ $2) == -1)
fatal("asprintf");
}
;