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