hongzhidao
806135f1c9
Router: fixed "pass" to upstreams.
...
Messed up return values in nxt_upstream_find() caused error in applying any
configuration with a valid "pass" value in router configuration pointing to
upstream. That wasn't the case in "listeners" objects, where the return value
wasn't checked.
Also, it caused segfault in cases where the "pass" option was configured with
variables and resulting value was pointing to a non-existent upstream.
Added missing return checks as well to catch possible memory allocation errors.
The bug was introduced in d32bc428f46b.
This closes #472 issue on GitHub.
2020-08-28 00:53:36 -04:00
Andrei Zeliankou
d5e9159340
Tests: migrated to the pytest.
2020-09-16 21:31:15 +01:00
Axel Duch
b6792b00ae
Router: route patterns multi wildcards fix.
...
Matching 'start' and 'end' position now adjusted to avoid false matching.
This is related to #434 issue on Github.
Thanks to 洪志道 (Hong Zhi Dao).
2020-07-10 10:28:53 +01:00
Axel Duch
a9a21f6fe4
Router: route patterns multi wildcards support.
2020-07-04 03:24:07 +01:00
Andrei Zeliankou
ea841400f5
Tests: added test for encoding in the "pass" option.
2020-05-15 04:21:10 +01:00
Andrei Zeliankou
ce4a2bbd05
Tests: style.
2020-05-15 04:20:56 +01:00
Axel Duch
26f407e24a
Tests: decode uri and args.
2020-05-14 12:29:22 +02:00
Andrei Zeliankou
6a9a4fe0d4
Tests: introduced module version specification in prerequisites.
2020-04-24 05:08:56 +01:00
Andrei Zeliankou
0bfa09dfa0
Tests: minor fixes and style.
2020-04-14 02:35:04 +01:00
Andrei Zeliankou
6e5b5d2a0b
Tests: added tests for "return" action.
2020-03-27 15:50:09 +00:00
Andrei Zeliankou
b214b7c690
Tests: more routing tests with negative rules.
2020-01-31 18:12:16 +00:00
Andrei Zeliankou
3b7b2fae54
Tests: check unique options in "action" object.
2020-03-03 17:54:02 +00:00
Valentin Bartenev
a60f856ce2
Improved validation of the "action" object.
...
Now it enforces the mutual exclusivity of "pass", "proxy", and "share" options.
2020-03-03 20:37:47 +03:00
Andrei Zeliankou
fbc72d7fec
Tests: added test with invalid IPv6 address in routing block.
2020-02-27 01:37:54 +00:00
Axel Duch
96a9a790a0
Tests: routing by listener address.
2019-12-24 13:59:58 +00:00
Axel Duch
ee8fa5d467
Tests: routing by client address configuration.
2019-12-24 13:58:22 +00:00
Andrei Zeliankou
c2a7e403ef
Tests: routing tests refactored.
2019-12-09 15:34:35 +03:00
Andrey Zelenkov
d58fe3db98
Tests: more URI normalization tests.
2019-10-23 16:59:53 +03:00
Andrey Zelenkov
31bbc755fd
Tests: check initial configuration in test_routing.py.
2019-10-23 16:05:40 +03:00
Andrey Zelenkov
65ca2d7b19
Tests: refactored prerequisites model.
2019-09-14 14:44:35 +03:00
Axel Duch
7785c96c1a
Added routing based on request scheme.
...
Scheme matches exact string “http” or “https”.
2019-07-24 13:47:35 +03:00
Andrey Zelenkov
ce1fbd9273
Tests: simplified one route case configuration.
...
No functional changes.
2019-07-14 23:49:45 +03:00
Andrey Zelenkov
29225c4fc6
Tests: removed misleading comments in test_routing.t.
2019-07-02 15:36:13 +03:00
Igor Sysoev
1f8c395fc0
Cookie-based routing should be case-sensitive.
2019-06-10 18:47:35 +03:00
Andrey Zelenkov
7927c20b3b
Tests: routing "cookies" tests.
2019-05-30 16:47:39 +03:00
Andrey Zelenkov
c0ed2c02ab
Tests: routing "arguments" tests.
2019-05-30 16:47:39 +03:00
Andrey Zelenkov
89bf008880
Tests: routing "headers" tests.
2019-05-30 16:47:39 +03:00
Andrey Zelenkov
67772cd3e9
Tests: fixed tests without "Host" header.
2019-05-30 16:47:39 +03:00
Andrey Zelenkov
90c5d3f5c0
Tests: adjusted skipping tests.
2019-05-30 16:46:04 +03:00
Andrey Zelenkov
7ad4a76704
Tests: configure arrays with PUT tests.
2019-05-30 16:44:14 +03:00
Andrey Zelenkov
c4ed3025b3
Tests: more routing tests with arrays.
2019-04-26 17:35:32 +03:00
Andrey Zelenkov
1c56579ebd
Tests: fixed naming.
2019-04-22 18:37:46 +03:00
Andrey Zelenkov
704529e4b1
Tests: more wildcard pattern tests for routing.
2019-04-15 16:08:53 +03:00
Andrey Zelenkov
af24e4dec4
Tests: simplified module checking.
2019-04-09 16:14:42 +03:00
Andrey Zelenkov
19eba1730a
Tests: unit module refactoring.
2019-03-28 18:43:13 +03:00
Andrey Zelenkov
281899fcef
Tests: style.
2019-03-26 23:38:30 +03:00
Andrey Zelenkov
8488666d60
Tests: routing.
2019-02-27 19:46:27 +03:00