-/* $OpenBSD: httpd.c,v 1.6 2014/07/23 23:10:27 reyk Exp $ */
+/* $OpenBSD: httpd.c,v 1.7 2014/07/24 08:32:36 reyk Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
void
kv_free(struct kv *kv)
{
- if (kv->kv_type == KEY_TYPE_NONE)
- return;
if (kv->kv_key != NULL) {
free(kv->kv_key);
}
-/* $OpenBSD: server.c,v 1.7 2014/07/23 13:26:39 reyk Exp $ */
+/* $OpenBSD: server.c,v 1.8 2014/07/24 08:32:36 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
SPLAY_REMOVE(client_tree, &srv->srv_clients, clt);
+ /* free the HTTP descriptors incl. headers */
+ server_close_http(clt);
+
event_del(&clt->clt_ev);
if (clt->clt_bev != NULL)
bufferevent_disable(clt->clt_bev, EV_READ|EV_WRITE);
if (clt->clt_bev != NULL)
bufferevent_free(clt->clt_bev);
- else if (clt->clt_output != NULL)
+ if (clt->clt_output != NULL)
evbuffer_free(clt->clt_output);
if (clt->clt_file != NULL)
-/* $OpenBSD: server_http.c,v 1.10 2014/07/23 21:43:12 reyk Exp $ */
+/* $OpenBSD: server_http.c,v 1.11 2014/07/24 08:32:36 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
desc->http_version = NULL;
}
kv_purge(&desc->http_headers);
+ desc->http_lastheader = NULL;
}
void