Home
last modified time | relevance | path

Searched refs:get_xff (Results 1 – 2 of 2) sorted by relevance

/unit/test/
H A Dtest_client_ip.py29 def get_xff(self, xff, sock_type='ipv4'): member in TestClientIP
56 assert self.get_xff('1.1.1.1') == '127.0.0.1', 'bad source'
57 assert self.get_xff('blah') == '127.0.0.1', 'bad header'
66 assert self.get_xff('1.1.1.1') == '1.1.1.1', 'replace'
67 assert self.get_xff('blah') == '127.0.0.1', 'bad header 2'
72 assert self.get_xff('1.1.1.1') == '127.0.0.1', 'bad source 3'
79 self.get_xff('8.8.8.8, 84.23.23.11') == '84.23.23.11'
99 assert self.get_xff(ip, 'ipv6') == ip, 'replace'
111 assert self.get_xff(ip, 'unix') == ip, 'replace'
122 assert self.get_xff('1.1.1.1') == '1.1.1.1', 'xff chain'
[all …]
H A Dtest_unix_abstract.py49 def get_xff(xff, sock_type='ipv4'): function
102 assert get_xff('1.1.1.1') == '127.0.0.1', 'bad source ipv4'
103 assert get_xff('1.1.1.1', 'ipv6') == '::1', 'bad source ipv6'
109 assert get_xff(ip, 'unix') == ip, 'replace'