Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Range in Http/2

Hi

I see. Yes, RFC says payload must be exactly 8 bytes. Or it should be a connection error.  I have also reviewed your improvement on the PingFrame. If you raise this exception in the construct function to told the user payload must be 8 byte.

if (payload.length != PING_LENGTH)
throw new IllegalArgumentException("PING payload must be 8 bytes");

I think this construct method must add this check

public PingFrame(long value, boolean reply)

And for this construct method

public PingFrame(boolean reply)

the default payload need to be set 8. Not null.

BTW: is it available to print the response of the ping frame from the server in Jetty. Many Thanks

Best Regards
Muhui Jiang

2015-09-27 23:04 GMT+08:00 Simone Bordet <sbordet@xxxxxxxxxxx>:
Hi,

On Sun, Sep 27, 2015 at 12:24 PM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Hi
>
> I see. When I set the value of RANGE as “bytes=100-400” it works. But when
> the value of range doesn't have such a format. The result goes like what I
> mentioned in my first Email. I think it may not be a bug of Jetty. But this
> design may not be so good I suggest Jetty can add some restriction to help
> the users build range in right format.
>
> Another thing is about the PING. Here is what I do with ping frame:
>
> byte[] payload = new byte[8];
>
> session.ping(new PingFrame(null, false), Callback.NOOP);

As per specification, the PING payload must be exactly 8 bytes, cannot be null.
I have improved PingFrame to offer handy constructors.

--
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