Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lighttpd: lighttpd 1.4.77 #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lighttpd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

LIGHTTPD="lighttpd-1.4.53"
LIGHTTPD="lighttpd-1.4.77"
PKG_URL="https://download.lighttpd.net/lighttpd/releases-1.4.x/${LIGHTTPD}.tar.gz"
PKG_MIRROR_URL="https://files.phoesys.com/ports/${LIGHTTPD}.tar.gz"

Expand Down Expand Up @@ -45,6 +45,7 @@ if [ ! -f "$PREFIX_PORT_BUILD/config.h" ]; then
LIGHTTPD_CFLAGS="-DLIGHTTPD_STATIC -DPHOENIX"
WITH_ZLIB="no" && [ "$PORTS_ZLIB" = "y" ] && WITH_ZLIB="yes"

( cd "$PREFIX_LIGHTTPD_SRC" && "./autogen.sh" )
( cd "$PREFIX_PORT_BUILD" && "$PREFIX_LIGHTTPD_SRC/configure" LIGHTTPD_STATIC=yes CFLAGS="${LIGHTTPD_CFLAGS} ${CFLAGS}" CPPFLAGS="" LDFLAGS="${LDFLAGS}" AR_FLAGS="-r" \
-C --disable-ipv6 --disable-mmap --with-bzip2=no \
--with-zlib="$WITH_ZLIB" --enable-shared=no --enable-static=yes --disable-shared --host="$HOST" --with-openssl="${PREFIX_OPENSSL}" --with-pcre="${PREFIX_PCRE}" \
Expand Down
16 changes: 16 additions & 0 deletions lighttpd/patches/HTTP2-post.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/request.c b/src/request.c
index 3a22e110..e684f7c6 100644
--- a/src/request.c
+++ b/src/request.c
@@ -1222,9 +1222,10 @@ http_request_parse (request_st * const restrict r, const int scheme_port)
}

if (0 == r->reqbody_length) {
- /* POST requires Content-Length (or Transfer-Encoding)
+ /* POST generally expects Content-Length (or Transfer-Encoding)
* (-1 == r->reqbody_length when Transfer-Encoding: chunked)*/
if (HTTP_METHOD_POST == r->http_method
+ && r->http_version <= HTTP_VERSION_1_1
&& !light_btst(r->rqst_htags, HTTP_HEADER_CONTENT_LENGTH)) {
return http_request_header_line_invalid(r, 411, "POST-request, but content-length missing -> 411");
}
54 changes: 54 additions & 0 deletions lighttpd/patches/SSI-exec.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/src/mod_ssi.c b/src/mod_ssi.c
index 11659927..bc0ee3b8 100644
--- a/src/mod_ssi.c
+++ b/src/mod_ssi.c
@@ -1160,6 +1160,9 @@ static int process_ssi_stmt(request_st * const r, handler_ctx * const p, const c
/* send cmd output to a temporary file */
if (0 != chunkqueue_append_mem_to_tempfile(cq, "", 0, errh)) break;
c = cq->last;
+ off_t flen = c->file.length;
+ if (flen && flen != lseek(c->file.fd, flen, SEEK_SET))
+ log_perror(errh, __FILE__, __LINE__, "lseek failed");

int status = 0;
struct stat stb;
@@ -1184,7 +1187,7 @@ static int process_ssi_stmt(request_st * const r, handler_ctx * const p, const c
if (0 == fstat(c->file.fd, &stb)) {
}
}
- chunkqueue_update_file(cq, c, stb.st_size);
+ chunkqueue_update_file(cq, c, stb.st_size - flen);
break;
}
case SSI_IF: {
diff --git a/src/t/test_mod_ssi.c b/src/t/test_mod_ssi.c
index 622e29ea..32d5b01d 100644
--- a/src/t/test_mod_ssi.c
+++ b/src/t/test_mod_ssi.c
@@ -87,20 +87,22 @@ test_mod_ssi_read_fd (request_st * const r, handler_ctx * const hctx)
assert(NULL == cq->first);

#ifndef _WIN32 /* TODO: command for cmd.exe */
+ const char ssi_exec2[] =
+ "result: <!--#exec cmd=\"expr 1 + 1\"-->";
hctx->conf.ssi_exec = 1;
- test_mod_ssi_write_testfile(fd, ssi_exec, sizeof(ssi_exec)-1);
+ test_mod_ssi_write_testfile(fd, ssi_exec2, sizeof(ssi_exec2)-1);
test_mod_ssi_reset(r, hctx);
mod_ssi_read_fd(r, hctx, &st, fd);
assert(cq->first);
assert(cq->first->type == FILE_CHUNK);
- assert(2 == chunkqueue_length(cq));
+ assert(10 == chunkqueue_length(cq));
char buf[80];
if (0 != lseek(cq->first->file.fd, 0, SEEK_SET)
- || 2 != read(cq->first->file.fd, buf, sizeof(buf))) {
+ || 10 != read(cq->first->file.fd, buf, sizeof(buf))) {
perror("lseek(),read()");
exit(1);
}
- assert(0 == memcmp(buf, "2\n", 2));
+ assert(0 == memcmp(buf, "result: 2\n", 10));
hctx->conf.ssi_exec = 0;
#endif

12 changes: 0 additions & 12 deletions lighttpd/patches/arpa_inet_include.patch

This file was deleted.

16 changes: 0 additions & 16 deletions lighttpd/patches/fdevent_del_bug_fix.patch

This file was deleted.

17 changes: 0 additions & 17 deletions lighttpd/patches/fionread_bug.patch

This file was deleted.

102 changes: 0 additions & 102 deletions lighttpd/patches/makefile_wstunnel.patch

This file was deleted.

16 changes: 0 additions & 16 deletions lighttpd/patches/mod_cgi_mmap_fix.patch

This file was deleted.

39 changes: 0 additions & 39 deletions lighttpd/patches/mod_compress_fix.patch

This file was deleted.

16 changes: 0 additions & 16 deletions lighttpd/patches/stream_mmap_fix.patch

This file was deleted.

Loading