Correct various edge cases in the new HTTP Host header validation parser.
Patch provided by Katya Todorova.
Fix IPv6/IPv4 parsing for host header:
- chars other than : should not be allowed in IPv6 address after ]
- ::: should not present in IPv6 address
- IPv4 part of IPv6 address was not correctly parsed (1 symbol of IPv4 part was ignored)
- tests added to cover IPv4/6 parsing
- parsed test class fixed not to throw NPE when an exception is expected but not thrown
|