curl-library
Re: how to use http/2 server push?
Date: Mon, 4 May 2015 15:25:19 +0200
> We would (somehow) dynamically create a new easy handle and stream for a
pushed resource and allow the application to deny it or to receive it like
an ordinary
> transfer. The creation of the easy handle would probably then have to be
presented to the application with a callback or something and the
application would then
> have to setup options etc for the transfer (like write callback etc). We
could also imagine the application being allowed to cancel such a request.
I like this one. Something to think about is the behavior of
SETTINGS_ENABLE_PUSH
....
On Mon, May 4, 2015 at 2:11 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> Hey
>
> Anyone around who has been thinking about using HTTP/2 and server push in
> an application? Server push means that a new stream is initiated from the
> server without the client specifically asking for it. Typically it would be
> resource B that the server thinks the client wants since it asked for
> resource A. Like in a web scenario it could be the CSS if the client asked
> for the html.
>
> A client can of course deny it (or disallow it completely in the first
> place), but how would you like the API for libcurl to expose this
> functionality?
>
> Method 1:
>
> I started out thinking we should have an option that allows us to setup an
> easy handle and add it to the multi handle just idling until the server
> (might) do a push. This is rather inflexible and forces the application to
> know before-hand how many pushed streams it'd like.
>
> Method 2:
>
> We would (somehow) dynamically create a new easy handle and stream for a
> pushed resource and allow the application to deny it or to receive it like
> an ordinary transfer. The creation of the easy handle would probably then
> have to be presented to the application with a callback or something and
> the application would then have to setup options etc for the transfer (like
> write callback etc). We could also imagine the application being allowed to
> cancel such a request.
>
> Method 3:
>
> I'm sure we can think of other ways. What do you think?
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-04