mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +00:00
Added handling of the "slot" field in SYN_STREAM frames.
Modified parser and generator, and the session implementation for now ignores this field.
This commit is contained in:
parent
70e4a103ec
commit
f872676a65
@ -213,7 +213,7 @@ public class ClosedStreamTest extends AbstractTest
|
|||||||
|
|
||||||
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory().newCompressor());
|
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory().newCompressor());
|
||||||
int streamId = 1;
|
int streamId = 1;
|
||||||
ByteBuffer synData = generator.control(new SynStreamFrame(version,SynInfo.FLAG_CLOSE, streamId,0,(byte)0,new Headers()));
|
ByteBuffer synData = generator.control(new SynStreamFrame(version,SynInfo.FLAG_CLOSE, streamId,0,(byte)0,(short)0,new Headers()));
|
||||||
|
|
||||||
final SocketChannel socketChannel = SocketChannel.open(startServer);
|
final SocketChannel socketChannel = SocketChannel.open(startServer);
|
||||||
socketChannel.write(synData);
|
socketChannel.write(synData);
|
||||||
@ -261,7 +261,7 @@ public class ClosedStreamTest extends AbstractTest
|
|||||||
Assert.assertThat(buffer.hasRemaining(), is(false));
|
Assert.assertThat(buffer.hasRemaining(), is(false));
|
||||||
|
|
||||||
assertThat("GoAway frame is received by server", goAwayReceivedLatch.await(5,TimeUnit.SECONDS), is(true));
|
assertThat("GoAway frame is received by server", goAwayReceivedLatch.await(5,TimeUnit.SECONDS), is(true));
|
||||||
|
|
||||||
socketChannel.close();
|
socketChannel.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ public class PushStreamTest extends AbstractTest
|
|||||||
final SocketChannel channel = SocketChannel.open(serverAddress);
|
final SocketChannel channel = SocketChannel.open(serverAddress);
|
||||||
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory.StandardCompressor());
|
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory.StandardCompressor());
|
||||||
int streamId = 1;
|
int streamId = 1;
|
||||||
ByteBuffer writeBuffer = generator.control(new SynStreamFrame(version,(byte)0,streamId,0,(byte)0,new Headers()));
|
ByteBuffer writeBuffer = generator.control(new SynStreamFrame(version,(byte)0,streamId,0,(byte)0,(short)0,new Headers()));
|
||||||
channel.write(writeBuffer);
|
channel.write(writeBuffer);
|
||||||
assertThat("writeBuffer is fully written",writeBuffer.hasRemaining(), is(false));
|
assertThat("writeBuffer is fully written",writeBuffer.hasRemaining(), is(false));
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class UnsupportedVersionTest extends AbstractTest
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
SynStreamFrame frame = new SynStreamFrame(SPDY.V2, SynInfo.FLAG_CLOSE, 1, 0, (byte)0, new Headers());
|
SynStreamFrame frame = new SynStreamFrame(SPDY.V2, SynInfo.FLAG_CLOSE, 1, 0, (byte)0, (short)0, new Headers());
|
||||||
Generator generator = new Generator(new StandardByteBufferPool(), new StandardCompressionFactory.StandardCompressor());
|
Generator generator = new Generator(new StandardByteBufferPool(), new StandardCompressionFactory.StandardCompressor());
|
||||||
ByteBuffer buffer = generator.control(frame);
|
ByteBuffer buffer = generator.control(frame);
|
||||||
// Replace the version byte with an unsupported version
|
// Replace the version byte with an unsupported version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user