From fa361cd1b99f42a4c77105e2c636c478bc5af69a Mon Sep 17 00:00:00 2001 From: reyk Date: Fri, 25 Jul 2014 23:25:38 +0000 Subject: [PATCH] Reset the default Host for each request --- usr.sbin/httpd/server_http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c index a05f25cc7d7..bfc52725dd7 100644 --- a/usr.sbin/httpd/server_http.c +++ b/usr.sbin/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.18 2014/07/25 23:23:39 reyk Exp $ */ +/* $OpenBSD: server_http.c,v 1.19 2014/07/25 23:25:38 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -506,6 +506,7 @@ void server_reset_http(struct client *clt) { struct http_descriptor *desc = clt->clt_desc; + struct server *srv = clt->clt_srv; server_httpdesc_free(desc); desc->http_method = 0; @@ -514,6 +515,7 @@ server_reset_http(struct client *clt) clt->clt_line = 0; clt->clt_done = 0; clt->clt_bev->readcb = server_read_http; + clt->clt_srv_conf = &srv->srv_conf; } static void -- 2.20.1