On Sun, 2007-09-09 at 10:15 +0000, [EMAIL PROTECTED] wrote:
> Author: rolandw
> Date: Sun Sep  9 03:15:39 2007
> New Revision: 573978
> 
> URL: http://svn.apache.org/viewvc?rev=573978&view=rev
> Log:
> HTTPCORE-107: BasicLineParser uses configurable protocol name
> 

...

> +        final String protoname = this.protocol.getProtocol();
> +        final int protolength  = protoname.length();
> +
> +        int i = skipWhitespace(buffer, indexFrom);
> +        // long enough for "HTTP/1.1"?
> +        if (i + protolength + 4 > indexTo) {
> +            throw new ParseException
> +                ("Not a valid protocol version: " +
> +                 buffer.substring(indexFrom, indexTo));
> +        }
> +

Roland,

If you want the parser to be truly generic you cannot expect the version
part to always be 4 char in length as it can also be something like
20.121 or 234.5

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to