Browse Source

don't use accept-filtering if SSL is used

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@320 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.3.14
Jan Kneschke 17 years ago
parent
commit
279af9590f
  1. 29
      src/network.c

29
src/network.c

@ -241,21 +241,6 @@ int network_server_init(server *srv, buffer *host_token, specific_config *s) {
return -1;
}
#ifdef SO_ACCEPTFILTER
/*
* FreeBSD accf_http filter
*
*/
memset(&afa, 0, sizeof(afa));
strcpy(afa.af_name, "httpready");
if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)) < 0) {
if (errno != ENOENT) {
log_error_write(srv, __FILE__, __LINE__, "ss", "can't set accept-filter 'httpready': ", strerror(errno));
}
}
#endif
if (s->is_ssl) {
#ifdef USE_OPENSSL
if (srv->ssl_is_init == 0) {
@ -320,6 +305,20 @@ int network_server_init(server *srv, buffer *host_token, specific_config *s) {
"ssl requested but openssl support is not compiled in");
return -1;
#endif
} else {
#ifdef SO_ACCEPTFILTER
/*
* FreeBSD accf_http filter
*
*/
memset(&afa, 0, sizeof(afa));
strcpy(afa.af_name, "httpready");
if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)) < 0) {
if (errno != ENOENT) {
log_error_write(srv, __FILE__, __LINE__, "ss", "can't set accept-filter 'httpready': ", strerror(errno));
}
}
#endif
}

Loading…
Cancel
Save