-/* $OpenBSD: httpd.h,v 1.25 2014/07/31 17:55:09 reyk Exp $ */
+/* $OpenBSD: httpd.h,v 1.26 2014/07/31 18:07:11 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
int clt_persist;
int clt_line;
int clt_done;
+ int clt_chunk;
int clt_inflight;
struct evbuffer *clt_log;
-/* $OpenBSD: server_fcgi.c,v 1.4 2014/07/31 17:55:09 reyk Exp $ */
+/* $OpenBSD: server_fcgi.c,v 1.5 2014/07/31 18:07:11 reyk Exp $ */
/*
* Copyright (c) 2014 Florian Obser <florian@openbsd.org>
DPRINTF("%s", (char *) &buf +
sizeof(struct fcgi_record_header));
- server_fcgi_header(clt, 200);
+ if (++clt->clt_chunk == 1)
+ server_fcgi_header(clt, 200);
server_bufferevent_write(clt, (char *)&buf +
sizeof(struct fcgi_record_header),
len - sizeof(struct fcgi_record_header));
-/* $OpenBSD: server_http.c,v 1.24 2014/07/31 17:55:09 reyk Exp $ */
+/* $OpenBSD: server_http.c,v 1.25 2014/07/31 18:07:11 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
clt->clt_headerlen = 0;
clt->clt_line = 0;
clt->clt_done = 0;
+ clt->clt_chunk = 0;
clt->clt_bev->readcb = server_read_http;
clt->clt_srv_conf = &srv->srv_conf;
}