mirror of https://github.com/yandex/gixy
Allowed more characters for map/upstream/etc directives
parent
3c1437c816
commit
7d8fb8845f
|
@ -135,7 +135,7 @@ class RawParser(object):
|
||||||
|
|
||||||
hash_block << (
|
hash_block << (
|
||||||
keyword +
|
keyword +
|
||||||
Group(OneOrMore(space + variable)) +
|
Group(OneOrMore(space + value)) +
|
||||||
Group(
|
Group(
|
||||||
left_bracket +
|
left_bracket +
|
||||||
Optional(OneOrMore(hash_value)) +
|
Optional(OneOrMore(hash_value)) +
|
||||||
|
@ -144,7 +144,7 @@ class RawParser(object):
|
||||||
|
|
||||||
generic_block << (
|
generic_block << (
|
||||||
keyword +
|
keyword +
|
||||||
Group(ZeroOrMore(space + variable)) +
|
Group(ZeroOrMore(space + value)) +
|
||||||
Group(
|
Group(
|
||||||
left_bracket +
|
left_bracket +
|
||||||
Optional(sub_block) +
|
Optional(sub_block) +
|
||||||
|
@ -153,7 +153,7 @@ class RawParser(object):
|
||||||
|
|
||||||
unparsed_block << (
|
unparsed_block << (
|
||||||
keyword +
|
keyword +
|
||||||
Group(ZeroOrMore(space + variable)) +
|
Group(ZeroOrMore(space + value)) +
|
||||||
nestedExpr(opener="{", closer="}")
|
nestedExpr(opener="{", closer="}")
|
||||||
)("unparsed_block")
|
)("unparsed_block")
|
||||||
|
|
||||||
|
|
|
@ -497,6 +497,22 @@ add_header X-Blank-Comment blank;
|
||||||
assert_config(config, expected)
|
assert_config(config, expected)
|
||||||
|
|
||||||
|
|
||||||
|
def test_upstream_dot():
|
||||||
|
config = '''
|
||||||
|
upstream test.mysite.com {
|
||||||
|
server 127.0.0.1:9009;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
expected = [
|
||||||
|
['upstream', ['test.mysite.com'], [
|
||||||
|
['server', '127.0.0.1:9009']
|
||||||
|
]],
|
||||||
|
]
|
||||||
|
|
||||||
|
assert_config(config, expected)
|
||||||
|
|
||||||
|
|
||||||
def test_empty_config():
|
def test_empty_config():
|
||||||
config = '''
|
config = '''
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue