diff options
author | Martin Matuska <mm@FreeBSD.org> | 2010-08-03 19:09:15 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2010-08-03 19:09:15 +0000 |
commit | a06e0ef389ed363dfcc21d4b52f0e9d910d52214 (patch) | |
tree | ce47ba99e1d8b8e901b1be59703c16d2c837712d /www/lighttpd/files | |
parent | - enable LICENSE framework (thanks to swell.k _at_ gmail.com) (diff) |
Fix stalls while reading from ssl sockets [1]
Fix reload signal in rc script [2]
Fix use of IPv6 adresses in mod_extforward [3]
Add optional support for mod_geoip [4]
Move pkg-config to BUILD_DEPENDS
References:
http://redmine.lighttpd.net/issues/2197 [1]
http://redmine.lighttpd.net/issues/1889 [3]
http://redmine.lighttpd.net/wiki/1/Docs:ModGeoip [4]
PR: ports/145749 [1], ports/148869 [2], ports/144110 [3], ports/137664 [4]
Diffstat (limited to 'www/lighttpd/files')
-rw-r--r-- | www/lighttpd/files/lighttpd.sh.in | 2 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-connections.c | 47 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-mod_extforward.c | 19 |
3 files changed, 67 insertions, 1 deletions
diff --git a/www/lighttpd/files/lighttpd.sh.in b/www/lighttpd/files/lighttpd.sh.in index 3437aafe36ff..dca9319f5103 100644 --- a/www/lighttpd/files/lighttpd.sh.in +++ b/www/lighttpd/files/lighttpd.sh.in @@ -35,7 +35,7 @@ stop_postcmd=stop_postcmd restart_precmd="checkconfig" reload_precmd=reload_precmd reload_postcmd=reload_postcmd -sig_reload="-INT" +sig_reload="INT" check_cmd="checkconfig" extra_commands="reload check" diff --git a/www/lighttpd/files/patch-src-connections.c b/www/lighttpd/files/patch-src-connections.c new file mode 100644 index 000000000000..96cf9698fc7d --- /dev/null +++ b/www/lighttpd/files/patch-src-connections.c @@ -0,0 +1,47 @@ +--- src/connections.c.orig ++++ src/connections.c +@@ -310,6 +310,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) { + /* the other end close the connection -> KEEP-ALIVE */ + + return -2; ++ } else { ++ joblist_append(srv, con); + } + + return 0; +@@ -320,6 +322,7 @@ static int connection_handle_read_ssl(server *srv, connection *con) { + #endif + } + ++/* 0: everything ok, -1: error, -2: con closed */ + static int connection_handle_read(server *srv, connection *con) { + int len; + buffer *b; +@@ -1180,15 +1183,20 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents) + + joblist_append(srv, con); + +- if (revents & FDEVENT_IN) { +- con->is_readable = 1; +-#if 0 +- log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd); +-#endif +- } +- if (revents & FDEVENT_OUT) { +- con->is_writable = 1; +- /* we don't need the event twice */ ++ if (con->conf.is_ssl) { ++ /* ssl may read and write for both reads and writes */ ++ if (revents & (FDEVENT_IN | FDEVENT_OUT)) { ++ con->is_readable = 1; ++ con->is_writable = 1; ++ } ++ } else { ++ if (revents & FDEVENT_IN) { ++ con->is_readable = 1; ++ } ++ if (revents & FDEVENT_OUT) { ++ con->is_writable = 1; ++ /* we don't need the event twice */ ++ } + } diff --git a/www/lighttpd/files/patch-src-mod_extforward.c b/www/lighttpd/files/patch-src-mod_extforward.c new file mode 100644 index 000000000000..398f53fbdc0a --- /dev/null +++ b/www/lighttpd/files/patch-src-mod_extforward.c @@ -0,0 +1,19 @@ +--- src/mod_extforward.c.orig 2010-02-19 11:34:37.000000000 +0100 ++++ src/mod_extforward.c 2010-02-19 11:40:02.000000000 +0100 +@@ -240,14 +240,14 @@ static array *extract_forward_array(buff + int in_str = 0; + for (base = pbuffer->ptr, curr = pbuffer->ptr; *curr; curr++) { + if (in_str) { +- if ((*curr > '9' || *curr < '0') && *curr != '.' && *curr != ':') { ++ if ((*curr < '0' || *curr > '9') && *curr != '.' && *curr != ':' && (*curr < 'a' || *curr > 'f') && (*curr < 'A' || *curr > 'F')) { + /* found an separator , insert value into result array */ + put_string_into_array_len(result, base, curr - base); + /* change state to not in string */ + in_str = 0; + } + } else { +- if (*curr >= '0' && *curr <= '9') { ++ if ((*curr >= '0' && *curr <= '9') || (*curr >= 'a' && *curr <= 'f') || (*curr >= 'A' && *curr <= 'F')) { + /* found leading char of an IP address, move base pointer and change state */ + base = curr; + in_str = 1; |