(Same default as in nginx and Apache).
-/* $OpenBSD: httpd.h,v 1.44 2014/08/05 15:36:59 reyk Exp $ */
+/* $OpenBSD: httpd.h,v 1.45 2014/08/05 16:30:35 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
#define SERVER_NUMPROC 3
#define SERVER_MAXPROC 32
#define SERVER_MAXHEADERLENGTH 8192
+#define SERVER_MAXREQUESTS 100 /* max requests per connection */
#define SERVER_BACKLOG 10
#define SERVER_OUTOF_FD_RETRIES 5
-/* $OpenBSD: server_http.c,v 1.37 2014/08/05 14:36:10 deraadt Exp $ */
+/* $OpenBSD: server_http.c,v 1.38 2014/08/05 16:30:36 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
clt->clt_persist = 0;
}
+ if (clt->clt_persist >= SERVER_MAXREQUESTS)
+ clt->clt_persist = 0;
+
/*
* Do we have a Host header and matching configuration?
* XXX the Host can also appear in the URL path.