209c209,219
<         browserName = userAgentString.substring(0, versionStartIndex);
---
>         // Prevent the method from falling over with StringIndexOutOfRangeEx
>         // if there is no "/" in the userAgentString
>         if (versionStartIndex != -1)
>         {
>           browserName = userAgentString.substring(0, versionStartIndex);
>         }
>         else 
>         {
>           // this is probably some programmatic HTTP client such as Java1.3.
>           browserName = userAgentString;   
>         }
