344059 added x-extensions

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3059 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2011-05-03 02:09:54 +00:00
parent c8f531f699
commit 554309e5ac
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import java.util.Map;
public class FragmentExtension extends AbstractExtension
{
private int _maxLength=-1;
private int _fragments=1;
private int _minFragments=1;
public FragmentExtension()
{
@ -19,7 +19,7 @@ public class FragmentExtension extends AbstractExtension
if(super.init(parameters))
{
_maxLength=getInitParameter("maxLength",_maxLength);
_fragments=getInitParameter("fragments",_fragments);
_minFragments=getInitParameter("minFragments",_minFragments);
return true;
}
return false;
@ -45,7 +45,7 @@ public class FragmentExtension extends AbstractExtension
opcode=getConnection().continuationOpcode();
}
while (fragments<_fragments)
while (fragments<_minFragments)
{
int frag=length/2;
fragments++;

View File

@ -218,7 +218,7 @@ public class WebSocketMessageD07Test
"Sec-WebSocket-Origin: http://example.com\r\n"+
"Sec-WebSocket-Protocol: onConnect\r\n" +
"Sec-WebSocket-Version: 7\r\n"+
"Sec-WebSocket-Extensions: fragment;maxLength=4;fragments=7\r\n"+
"Sec-WebSocket-Extensions: fragment;maxLength=4;minFragments=7\r\n"+
"\r\n").getBytes("ISO-8859-1"));
output.flush();
@ -273,7 +273,7 @@ public class WebSocketMessageD07Test
"Sec-WebSocket-Protocol: echo\r\n" +
"Sec-WebSocket-Version: 7\r\n"+
"Sec-WebSocket-Extensions: x-deflate-frame\r\n"+
"Sec-WebSocket-Extensions: fragment;fragments=2\r\n"+
"Sec-WebSocket-Extensions: fragment;minFragments=2\r\n"+
"\r\n").getBytes("ISO-8859-1"));
output.flush();