Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Continuation Frame

Hi

As Jetty doesn't support sending CONTINUATION frames explicitly from the API. I am going to develop it by myself to support my research. 

I reviewed your implementations on how to sending priority frame and ping frame. It seems that we can do this by adding an interface in Session, and implement it in Http2Session by using control(stream, callback, frame);

I also find that there is no continuation frame in the package org.eclipse.jetty.http2.frames. Does that mean I also need to write a construct method of continuation frame.

Hope you can give me some hint or suggestions. Thank you so much.

Best Regards
Muhui Jiang

2015-09-29 14:28 GMT+08:00 Muhui Jiang <jiangmuhui@xxxxxxxxx>:
Hi

I want to send an HTTP/2 request (header frame) to a HTTP/2 server without
setting the END_HEADERS flag and then keep sending CONTINUATION frames
periodically. Then to check whether it can degrade the server performance(a kind of DDos attack).

I still do not know how to use the HeadersGenerator in the http/2 protocol because I didn't use the Class for my whole test, I don't where should I insert the construct method to build a test I mentioned above.

It seems my code like this can not work

session.newStream(new HeadersFrame(metaDataA, null, false),

new Promise.Adapter<>(), new Stream.Listener.Adapter() {


@Override

public void onHeaders(Stream stream, HeadersFrame frame) {

// TODO Auto-generated method stub

System.err.println(frame + childpath.get(0));

}


@Override

public Stream.Listener onPush(Stream stream,

PushPromiseFrame frame) {

// TODO Auto-generated method stub

System.err.println(frame + childpath.get(0));

return this;

}


@Override

public void onData(Stream stream, DataFrame frame,

Callback callback) {

// TODO Auto-generated method stub

System.err.println(frame + childpath.get(0));

callback.succeeded();

}

});

      ByteBufferPool.Lease lease = new ByteBufferPool.Lease(null);

HeadersGenerator headersGenerator = new HeadersGenerator(new HeaderGenerator(), new HpackEncoder(),100);

headersGenerator.generateHeaders(  lease, 1, metaDataA, null, false);


Best Regards

Muhui Jiang


2015-09-25 19:07 GMT+08:00 Simone Bordet <sbordet@xxxxxxxxxxx>:
Hi,

On Fri, Sep 25, 2015 at 10:23 AM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Hi
>
> Did you mean this
>
> generate(ByteBufferPool.Lease lease, FrameType frameType, int capacity, int
> length, int flags, int streamId)

I mean this:

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/generator/HeadersGenerator.java#n84

As you can see, the behavior of the HeadersGenerator can be changed by
changing the "maxHeaderBlockFragment" configuration parameter.
By changing that, you can send continuation frames.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top