Daniel Stenberg
2017-05-25 15:43:43 UTC
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...
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
Etiquet
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquet