jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: Re: Re: HTTP Push, URI and header mutations

From: Mark Thomas <markt_at_apache.org>
Date: Wed, 10 Dec 2014 09:57:56 +0000

On 10/12/2014 08:16, Stuart Douglas wrote:
>
>>
>> I think that in this case if the user attempts to set the method
>> to one that we know is explicitly disallowed by the HTTP2 spec we
>> should throw an IllegalArgumentException.
>>
>>
>> The other option is to just support GET and HEAD and control which one
>> with a
>> setHeadRequest(boolean) method?
>>
>> That removes the issue of throwing IAE for the arbitrary methods that
>> might get set on the push builder.
>>
>
> I think there is a good chance that over time people will extend the
> HTTP2 protocol in ways we can't really predict now, and limiting the
> push API to just two methods when the spec allows more seems short sighted.

+1. I had exactly the same thought.

Mark


> We have already been talking about way that we can take advantage of
> HTTP2 to replace some of our propietary protocols. For example you could
> use server push to push load information from a backend server to a load
> balancer, or you could use HTTP2 for EJB invocations, and use a custom
> verb to push the result of async invocations.
> I think we should throw an IAE basically to let users know they are
> doing it wrong and a compliant browser will reject the push, however we
> should not add any further restrictions.
>
> Stuart
>
>