curl / Mailing Lists / curl-users / Single Mail

curl-users

adding support for HTTP/2 push to the curl tool ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 25 May 2017 17:43:43 +0200 (CEST)

Hey,

I've gotten the feature request a few times and I've started to ponder on how
adding support for HTTP/2 push to curl is best done. libcurl itself supports
it fine, so this is "just" a matter of how want to control and specify it with
the tool.

HTTP/2 push is the server's way of saying "oh you want these resources too",
so when you ask for resource X you may also get resource Y sent back to you.

The most basic way to support this that I can think of, would be to point out
a directory where the (possibly) incoming files would be stored, and we'd
store them using the names the server tells us. Like this:

  $ curl --push $HOME/pushes https://daniel.haxx.se/

If nothing is pushed, the directory remains empty. If something is pushed with
the same name that a file already uses in that directory, the previous file
gets overwritten.

Good enough to start with? What else do we need to get in there to make it
usable?

Internally, we need to convert from using the easy interface to use the multi
interface so that we can handle multiple transfers properly. (Which could be
the little beginning of future support of parallel transfers.)

The perhaps biggest challenge is what to do with the progress meter when there
are several transfers going on...

-- 
  / daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-25