Update from 1.19.0 to 1.20.0.
Remove the needless patches, those been applied to upstream. <ChangeLog> *) Change: the PHP module is now initialized before chrooting; this enables loading all extensions from the host system. *) Change: AVIF and APNG image formats added to the default MIME type list. *) Change: functional tests migrated to the pytest framework. *) Feature: the Python module now fully supports applications that use the ASGI 3.0 server interface. *) Feature: the Python module now has a built-in WebSocket server implementation for applications, compatible with the HTTP & WebSocket ASGI Message Format 2.1 specification. *) Feature: automatic mounting of an isolated "/tmp" file system into chrooted application environments. *) Feature: the $host variable contains a normalized "Host" request value. *) Feature: the "callable" option sets Python application callable names. *) Feature: compatibility with PHP 8 RC 1. Thanks to Remi Collet. *) Feature: the "automount" option in the "isolation" object allows to turn off the automatic mounting of language module dependencies. *) Bugfix: "pass"-ing requests to upstreams from a route was broken; the bug had appeared in 1.19.0. Thanks to 洪志道 (Hong Zhi Dao) for discovering and fixing it. *) Bugfix: the router process could crash during reconfiguration. *) Bugfix: a memory leak occurring in the router process; the bug had appeared in 1.18.0. *) Bugfix: the "!" (non-empty) pattern was matched incorrectly; the bug had appeared in 1.19.0. *) Bugfix: fixed building on platforms without sendfile() support, notably NetBSD; the bug had appeared in 1.16.0. </ChangeLog>
This commit is contained in:
parent
d7ed7f73e5
commit
de53224864
|
@ -1,45 +0,0 @@
|
|||
--- auto/sendfile.orig 2020-08-08 16:00:55.378410575 -0400
|
||||
+++ auto/sendfile 2020-08-08 16:16:14.270362755 -0400
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
NXT_HAVE_LINUX_SENDFILE=NO
|
||||
NXT_HAVE_FREEBSD_SENDFILE=NO
|
||||
+NXT_HAVE_NETBSD_MMAP_WRITE=NO
|
||||
NXT_HAVE_MACOSX_SENDFILE=NO
|
||||
NXT_HAVE_SOLARIS_SENDFILEV=NO
|
||||
NXT_HAVE_AIX_SEND_FILE=NO
|
||||
@@ -82,6 +83,34 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+if [ $nxt_found = no ]; then
|
||||
+
|
||||
+ # NetBSD has no sendfile().
|
||||
+
|
||||
+ nxt_feature="NetBSD mmap()/write()"
|
||||
+ nxt_feature_name=NXT_HAVE_NETBSD_MMAP_WRITE
|
||||
+ nxt_feature_libs=
|
||||
+ nxt_feature_test="#include <sys/types.h>
|
||||
+ #include <sys/mman.h>
|
||||
+ #include <sys/stat.h>
|
||||
+ #include <fcntl.h>
|
||||
+ #include <unistd.h>
|
||||
+
|
||||
+ int main() {
|
||||
+ struct stat f;
|
||||
+ void *m = NULL;
|
||||
+
|
||||
+ fstat(-1, &f);
|
||||
+ m = mmap(NULL, f.st_size, PROT_READ, MAP_FILE | MAP_SHARED, -1, 0);
|
||||
+ write(-1, m, f.st_size);
|
||||
+ munmap(m, f.st_size);
|
||||
+ }"
|
||||
+ . auto/feature
|
||||
+
|
||||
+ if [ $nxt_found = yes ]; then
|
||||
+ NXT_HAVE_NETBSD_MMAP_WRITE=YES
|
||||
+ fi
|
||||
+fi
|
||||
|
||||
if [ $nxt_found = no ]; then
|
||||
$echo
|
|
@ -1,24 +0,0 @@
|
|||
--- src/nxt_conn_write.c.orig 2020-05-28 12:04:00.000000000 -0400
|
||||
+++ src/nxt_conn_write.c 2020-08-12 14:52:46.453112517 -0400
|
||||
@@ -266,6 +266,21 @@
|
||||
res = sendfile(s, fd, &pos, size);
|
||||
#endif
|
||||
|
||||
+#ifdef NXT_HAVE_NETBSD_MMAP_WRITE
|
||||
+ int err;
|
||||
+ void *map;
|
||||
+
|
||||
+ map = mmap(NULL, size, PROT_READ, MAP_FILE | MAP_SHARED, fd, pos);
|
||||
+ if (nxt_slow_path(map == MAP_FAILED)) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ res = write(s, map, size);
|
||||
+ err = errno;
|
||||
+ (void) munmap(map, size);
|
||||
+ errno = err;
|
||||
+#endif
|
||||
+
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue