From: Bitbucket <com...@bi...> - 2019-07-16 04:48:12
|
5 new commits in naviserver: https://bitbucket.org/naviserver/naviserver/commits/52bb027b53c4/ Changeset: 52bb027b53c4 User: gustafn Date: 2019-07-12 12:05:03+00:00 Summary: remove debug line Affected #: 1 file https://bitbucket.org/naviserver/naviserver/commits/b0e226cef4cb/ Changeset: b0e226cef4cb User: gustafn Date: 2019-07-13 12:06:10+00:00 Summary: new function Ns_SockaddrParseIPMask: factored out code from nsperm module to make it reusable Affected #: 2 files https://bitbucket.org/naviserver/naviserver/commits/c83ad37312c5/ Changeset: c83ad37312c5 User: gustafn Date: 2019-07-15 10:54:13+00:00 Summary: improve man page Affected #: 1 file https://bitbucket.org/naviserver/naviserver/commits/65a47eea3818/ Changeset: 65a47eea3818 User: gustafn Date: 2019-07-16 04:39:15+00:00 Summary: - New feature: context filter for urlspace NaviServer's urlspace a trie data structure used for various purposes such as registering methods/URL pairs for procs or for mapping of requests to connection thread pools. The classical trie mapping for e.g. "GET /foo/bar/*.html" is based on method + path + string match pattern, where the last part "*.html" is used as a "filter". The new version of NaviServer allows in addition to the string based glob pattern so-called "context filter", which include the IP-address or header fields in the matching process. The context filters are applied after the classical URLspace processing, such that the behavior is fully backwards compatible. The context filters are kept in a stable order (IP before header based filters, specific before less specific) such that the behavior is not order dependent. The new feature can be used map e.g. bots or certain IP ranges to the specified connection pools. When connection pools named "bots" and "local" are defined, one can use the following mapping commands to map incoming requests to the specified pools. ns_server -pool bots map "GET /* {user-agent *bot*}" ns_server -pool bots map "GET /* {user-agent *crawl*}" ns_server -pool bots map "GET /* {user-agent *baidu*}" ns_server -pool bots map "GET /* {X-NS-ip 2a03:2880::/29}" ns_server -pool local map "GET /* {X-NS-ip 127.0.0.1}" ns_server -pool local map "GET /* {X-NS-ip 137.208.1.0/16}" Note that arbitrary header fields can be used for the mapping, containing potentially some glob style match characters. The special header field "X-NS-ip" denotes IP based filters, which can be provided fully qualified or in CIDR notation (denoting significant bits) for IPv4 and IPv6. Current limitations: only for inherited patters, no "exact" feature, no deletion of a single filter via "ns_urlspace unset" (only "-allfiters"), only one constraint per rule, documentation not updated. - Defined typedef for free-procs "Ns_FreeProc" (more self explanatory than the previous usage of "Ns_Callback") - Use existing types "Ns_IndexCmpProc" and "Ns_IndexKeyCmpProc" consistently - Defined debug option "Debug(urlspace)" for urlspace debugging - Include "default" for the default pool name in the thread name (this eases the analysis of log files) - New API functionNs_SockaddrMaskedMatch() to check, whether an IPv4 or IPv6 address matches a provided masked address. - Extended regression test Affected #: 15 files https://bitbucket.org/naviserver/naviserver/commits/bc4a94384a6f/ Changeset: bc4a94384a6f User: gustafn Date: 2019-07-16 04:47:14+00:00 Summary: Make the regression tests pass by a) removing the explict testcase showing the difference between the ns_http regression test infrastructure and the old one (http-3.3new), and b) by using for test case http-5.5 as well the old test case infrastructure (use nstest::http-0.9 instead of nstest::http). This difference shows only up under Linux, but not on macOS Affected #: 1 file Repository URL: https://bitbucket.org/naviserver/naviserver/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |