Commit Graph

13 Commits (master)

Author SHA1 Message Date
cinap_lenrek a13ba7741f hget: do a HEAD request to check if the file is already complete (thanks miscief)
when we continue a download, make sure the file isnt already
complete, as otherwise the server might respond with a 416
as the range request will out of range.
2018-10-10 02:45:11 +02:00
cinap_lenrek e611879eab hget: work arround apache Content-Encoding: gzip for Content-Type: application/x-gzip bug
apache sends Content-Encoding: gzip header for Content-Type: application/x-gzip
causing hget to decompress tgz files.

from the w3c:

The Content-Encoding entity-header field is used as a modifier to the media-type.
When presented, its value indicates what additional content codings have been applied
to the entity-body, and thus what decoding mechanisms must be applied in order to
obtail the media-type referenced by the Conent-Type header field. Content-Encoding
is primarily used to allow a document to be compressed without losing the
identity of its underlying media type.

this is clearly silly, as the file is already compressed, and decompressing it
will not yield the indicated Content-type: application/x-gzip, but a tarball.

examples:

http://zlib.net/zlib-1.2.8.tar.gz
https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R50f.tgz
2015-05-14 14:12:28 +02:00
cinap_lenrek e118352324 hget: revert hget -v change, this needs more thought
problems that need to be addressed:

- reads in the whole /proc every second for no reason
- breaks when http server doesnt include Content-Length header
- length is wrong for continued download (-o option)
2014-03-23 18:47:59 +01:00
mischief a710914b36 hget: add the -v option to produce progress on stderr, like old hget 2014-03-22 23:28:42 -07:00
cinap_lenrek ab7fe19ae2 hget: handle http contentencoding (compression) 2013-10-12 02:22:57 +02:00
cinap_lenrek 7c3ea4360b hpost: add -l flag to get location url after POST 2012-10-18 14:38:07 +02:00
stanley lieber 7bada4bf2a hget: fix usage 2012-09-28 16:37:51 -05:00
cinap_lenrek 9a02104699 hget -P to read postbody from stdin 2012-09-15 07:07:19 +02:00
cinap_lenrek cc459aa7ab hget: fix -p to not put a newline into the postbody at the end 2012-09-15 06:25:32 +02:00
cinap_lenrek 812e0fd058 hget/play: fix enviroment leaks 2012-05-26 21:18:41 +02:00
stanley lieber 692d66feff hget: -p should work the same as in old hget 2012-03-16 12:58:01 -05:00
cinap_lenrek 29b26a2f17 hget: fix stderr redirection bug 2012-01-22 23:28:45 +01:00
cinap_lenrek 75e1ef0ab6 new webfs, rc based hget 2012-01-11 16:17:54 +01:00