tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1132362 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractHttp11Processor.java Http11AprProcessor.java Http11NioProcessor.java Http11Processor.java
Date Sun, 05 Jun 2011 20:05:06 GMT
On 05/06/2011 17:47, Rainer Jung wrote:
>>>> +            for (int i = valueL - 1; i > colonPos; i--) {
>>>> +                int charValue = HexUtils.getDec(valueB[i + valueS]);
>>>
>>> Any idea, why hex digits (including a-f, A-F) are allowed in port numbers?
>>>
>>> I know you only moved that code, but it reminded me of an observation I
>>> made long ago and forgot.
>>
>> I can't think of any good reason. Happy to limit that to the digits 0-9.
> 
> Would you prefer renaming HexUtils to NumberUtils (or similar) and havin
> getDecFromHex() and getDecFromDec() there, or a new class similar to
> HexUtils called DecUtils?

Or we could just use Ascii.parseInt(char[], int, int)

Just testing a patch now...

Mark



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


Mime
View raw message