Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Reprioritization of Jetty


Thanks Simone. Because I am doing research on the security of http/2 using Jetty as my tool. Controlling the rate and the size of packet may helps me to hide the real size of a packet without configuring the server, which can improve the security That is the reason why I did such thing that may mess up the flow control or something else. just want to explore any potential attack methods.

But thanks to your patient answer. I learned a lot.

Best Regards
Muhui Jiang

2015-09-28 14:40 GMT+08:00 Simone Bordet <sbordet@xxxxxxxxxxx>:

On Mon, Sep 28, 2015 at 6:19 AM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Hi
> The thing I want to do is :
> Download a big file from a HTTP/2 server like h2o, using my client(Jetty) to
> send windows_update frame periodically and see whether it can restrict the
> size of returned packet and control the timing. But I find I can do this
> with settings frame. So I am a little bit confused because I thought  this
> is what window_update frame should do.

The size of the DATA frames returned by the server is controlled by
the server buffer size and by the stream window size.
You can control the latter with a SETTINGS frame that sets the initial
stream window size.

The timing can be controlled by the FlowControlStrategy and by calling
succeed() on the content callback (of method
Stream.Listener.onData(Stream, DataFrame, Callback)), which means that
the content bytes have been consumed.
The default FlowControlStrategy (BufferingFlowControlStrategy)
accumulates bytes consumed by the client until a threshold is reached,
and then sends a WINDOW_UPDATE.
There is a simpler FlowControlStrategy (SimpleFlowControlStrategy)
that sends a WINDOW_UPDATE every time the client consumes the content.

Using SimpleFlowControlStrategy and succeeding the DATA frame callback
at the time you want gives you full control on when the WINDOW_UPDATE
frames are sent.

It's still not clear *why* you want to do this; if you want to stream
a large content from the server controlling the rate like YouTube
does, it is better done on the server than on the client.

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top