On 31/03/17 14:41, Mark Thomas wrote:
> On 31/03/17 09:43, Katya Todorova wrote:

<snip/>

>> I've created a separate pull request for leading zeros issue since I think
>> it requires additional discussion whether to be submitted or not. Although
>> this fix honors the specification, it leads to different behavior in case
>> of IPv4 address and IPv6 address with IPv4 part. This may cause confusion:
>> https://github.com/apache/tomcat/pull/49
> 
> Thanks for separating this out. It gives folks time to go and read the
> specification and form an opinion.

I've taken a look.

The spec is clear that leading zeros are not permitted in IPv4 addresses
as used in the authority component of a URI (or when the IPv4 address
appears as part of the IPv6 address).

However, I don't see the harm in allowing them and doing so makes the
parsing/validation simpler and therefore faster. Therefore, I'm leaning
towards being lenient and allowing leading zeros in IPv4 address components.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to