Fixing parseProtocols
This commit is contained in:
parent
83bd15559b
commit
f34ac9b920
|
@ -248,17 +248,15 @@ public class ServletUpgradeRequest extends UpgradeRequest
|
|||
{
|
||||
if (protocol == null)
|
||||
{
|
||||
return new String[]
|
||||
{ null };
|
||||
return new String[] {};
|
||||
}
|
||||
protocol = protocol.trim();
|
||||
if ((protocol == null) || (protocol.length() == 0))
|
||||
{
|
||||
return new String[]
|
||||
{ null };
|
||||
return new String[] {};
|
||||
}
|
||||
String[] passed = protocol.split("\\s*,\\s*");
|
||||
String[] protocols = new String[passed.length + 1];
|
||||
String[] protocols = new String[passed.length];
|
||||
System.arraycopy(passed,0,protocols,0,passed.length);
|
||||
return protocols;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue