-
Drop support for Ruby 2.3 (@janko)
-
Deprecate wget backend (@janko)
- Add support for HTTPX 1.x (@HoneyryderChuck)
-
Handle additional params in
Content-Disposition
header (@janko) -
Add ability to detect response URI when using net/http (@aglushkov)
-
Avoid deprecation warning in HTTPX (@ollym)
-
Handle unknown response status in net/http backend (@janko)
- Add new HTTPX backend, which supports HTTP/2 protocol among other features (@HoneyryderChuck)
- Correctly split cookie headers on
;
instead of,
when forwarding them on redirects (@ermolaev)
-
Add
:extension
argument toDown.download
for overriding tempfile extension (@razum2um) -
Normalize response header names for http.rb and wget backends (@zarqman)
- Keep original cookies between redirections (@antprt)
- Bump addressable version requirement to 2.8+ to remediate vulnerability (@aldodelgado)
-
Add info about received content length in
Down::TooLarge
error (@evheny0) -
Relax http.rb constraint to allow versions 5.x (@mgrunberg)
- Raise
Down::NotModified
on 304 response status inDown::NetHttp#open
(@ellafeldmann)
-
Add
:uri_normalizer
option toDown::NetHttp
(@janko) -
Add
:http_basic_authentication
option toDown::NetHttp#open
(@janko) -
Fix uninitialized instance variables warnings in
Down::ChunkedIO
(@janko) -
Handle unknown HTTP error codes in
Down::NetHttp
(@darndt)
- Fix keyword arguments warnings on Ruby 2.7 in
Down.download
andDown.open
(@janko)
-
Fix keyword arguments warnings on Ruby 2.7 (@janko)
-
Fix
FrozenError
exception inDown::ChunkedIO#readpartial
(@janko) -
Deprecate passing headers as top-level options in
Down::NetHttp
(@janko)
- In
Down::NetHttp
only use Addressable normalization ifURI.parse
fails (@coding-chimp)
-
Change
ChunkedIO#each_chunk
to return chunks in original encoding (@janko) -
Always return binary strings in
ChunkedIO#readpartial
(@janko) -
Handle frozen chunks in
Down::ChunkedIO
(@janko) -
Change
ChunkedIO#gets
to return lines in specified encoding (@janko) -
Halve memory allocation for
ChunkedIO#gets
(@janko) -
Halve memory allocation for
ChunkedIO#read
without arguments (@janko) -
Drop support for
HTTP::Client
argument inDown::HTTP.new
(@janko) -
Repurpose
Down::NotFound
to be raised on404 Not Found
response (@janko)
-
Make
ChunkedIO#read
/#readpartial
with length always return strings in binary encoding (@janko) -
In
ChunkedIO#gets
respect the limit argument when separator is nil (@edlebert)
-
Prefer UTF-8 filenames in
Content-Disposition
header forTempfile#original_filename
(@janko) -
Make the internal Tempfile of
Down::ChunkedIO
inaccessible to outside programs (@janko)
- Allow request headers to be passed via
:headers
toDown::NetHttp#download
and#open
(@janko)
- Release HTTP.rb version constraint to allow HTTP.rb 4.x (@janko)
-
Ensure URLs are properly encoded in
NetHttp#download
and#open
using Addressable (@linyaoli) -
Raise
ResponseError
with clear message when redirect URI was invalid in Down::NetHttp (@janko)
-
Deprecate passing an
HTTP::Client
object toDown::Http#initialize
(@janko) -
Add ability to pass a block to
Down::Http#initialize
for extending default options (@janko) -
Return empty string when length is zero in
ChunkedIO#read
andChunkedIO#readpartial
(@janko) -
Make
posix-spawn
optional (@janko)
-
Add
:method
option toDown::Http
for specifying the request method (@janko) -
Set default timeout of 30 for each operation to all backends (@janko)
-
Accept CLI arguments as a list of symbols in
Down::Wget#download
(@janko) -
Avoid potential URL parsing errors in
Down::Http::DownloadedFile#filename_from_url
(@janko) -
Make memory usage of
Down::Wget#download
constant (@janko) -
Add
:destination
option toDown.download
for specifying download destination (@janko)
-
Reduce memory allocation in
Down::ChunkedIO
by 10x when buffer string is used (@janko) -
Reduce memory allocation in
Down::Http.download
by 10x.
- Handle
:max_redirects
inDown::NetHttp#open
and follow up to 2 redirects by default (@janko)
-
Raise all system call exceptions as
Down::ConnectionError
inDown::NetHttp
(@janko) -
Raise
Errno::ETIMEDOUT
asDown::TimeoutError
inDown::NetHttp
(@janko) -
Raise
Addressable::URI::InvalidURIError
asDown::InvalidUrl
inDown::Http
(@janko)
-
Fix
FiberError
occurring onDown::NetHttp.open
when response is chunked and gzipped (@janko) -
Use a default
User-Agent
inDown::NetHttp.open
(@janko) -
Fix raw read timeout error sometimes being raised instead of
Down::TimeoutError
inDown.open
(@janko) -
Down::ChunkedIO
can now be parsed by the CSV Ruby standard library (@janko) -
Implement
Down::ChunkedIO#gets
(@janko) -
Implement
Down::ChunkedIO#pos
(@janko)
-
Load and assign the
NetHttp
backend immediately onrequire "down"
(@janko) -
Remove undocumented
Down::ChunkedIO#backend=
that was added in 4.0.0 to avoid confusion (@janko)
-
Don't apply
Down.download
andDown.open
overrides when loading a backend (@janko) -
Remove
Down::Http.client
attribute accessor (@janko) -
Make
Down::NetHttp
,Down::Http
, andDown::Wget
classes instead of modules (@janko) -
Remove
Down.copy_to_tempfile
(@janko) -
Add Wget backend (@janko)
-
Add
:content_length_proc
and:progress_proc
to the HTTP.rb backend (@janko) -
Halve string allocations in
Down::ChunkedIO#readpartial
when buffer string is not used (@janko)
-
Add
Down::ChunkedIO#readpartial
for more memory efficient reading (@janko) -
Fix
Down::ChunkedIO
not returning second part of the last chunk if it was previously partially read (@janko) -
Strip internal variables from
Down::ChunkedIO#inspect
and show only the important ones (@janko) -
Add
Down::ChunkedIO#closed?
(@janko) -
Add
Down::ChunkedIO#rewindable?
(@janko) -
In
Down::ChunkedIO
only create the Tempfile if it's going to be used (@janko)
-
Split
Down::NotFound
into explanatory exceptions (@janko) -
Add
:read_timeout
and:open_timeout
options toDown::NetHttp.open
(@janko) -
Return an
Integer
indata[:status]
on a result ofDown.open
when using the HTTP.rb strategy (@janko)
-
Make
Down.open
pass encoding from content type charset toDown::ChunkedIO
(@janko) -
Add
:encoding
option toDown::ChunkedIO.new
for specifying the encoding of returned content (@janko) -
Add HTTP.rb backend as an alternative to Net::HTTP (@janko)
-
Stop testing on MRI 2.1 (@janko)
-
Forward cookies from the
Set-Cookie
response header when redirecting (@janko) -
Add
frozen-string-literal: true
comments for less string allocations on Ruby 2.3+ (@janko) -
Modify
#content_type
to return nil instead ofapplication/octet-stream
whenContent-Type
is blank inDown.download
(@janko) -
Down::ChunkedIO#read
,#each_chunk
,#eof?
,rewind
now raise anIOError
whenDown::ChunkedIO
has been closed (@janko) -
Down::ChunkedIO
now caches only the content that has been read (@janko) -
Add
Down::ChunkedIO#size=
to allow assigning size after theDown::ChunkedIO
has been instantiated (@janko) -
Make
:size
an optional argument inDown::ChunkedIO
(@janko) -
Call enumerator's
ensure
block whenDown::ChunkedIO#close
is called (@janko) -
Add
:rewindable
option toDown::ChunkedIO
andDown.open
for disabling caching read content into a file (@janko) -
Drop support for MRI 2.0 (@janko)
-
Drop support for MRI 1.9.3 (@janko)
-
Remove deprecated
:progress
option (@janko) -
Remove deprecated
:timeout
option (@janko) -
Reraise only a subset of exceptions as
Down::NotFound
inDown.download
(@janko) -
Support streaming of "Transfer-Encoding: chunked" responses in
Down.open
again (@janko) -
Remove deprecated
Down.stream
(@janko)
- Remove URL from the error messages (@janko)
-
Support both Strings and
URI
objects inDown.download
andDown.open
(@olleolleolle) -
Work around a
CGI.unescape
bug in Ruby 2.4. -
Apply HTTP Basic authentication contained in URLs in
Down.open
. -
Raise
Down::NotFound
on 4xx and 5xx responses inDown.open
. -
Write
:status
and:headers
information toDown::ChunkedIO#data
inDown.open
. -
Add
#data
attribute toDown::ChunkedIO
for saving custom result data. -
Don't save retrieved chunks into the file in
Down::ChunkedIO#each_chunk
. -
Add
:proxy
option toDown.download
andDown.open
.
- Show the input URL in the
Down::Error
message.
- Don't raise
StopIteration
inDown::ChunkedIO
when:chunks
is an empty Enumerator.
- Correctly detect empty filename from
Content-Disposition
header, and in this case continue extracting filename from URL.
-
Allow
Down.open
to accept request headers as options with String keys, just likeDown.download
does. -
Decode URI-decoded filenames from the
Content-Disposition
header -
Parse filenames without quotes from the
Content-Disposition
header
- Work around
Transfer-Encoding: chunked
responses by downloading whole response body.
- In
Down.open
send requests using the URI path instead of the full URI.
-
Read #original_filename from the "Content-Disposition" header.
-
Extract
Down::ChunkedIO
into a file, so that it can be required separately. -
In
Down.stream
close the IO after reading from it.
- Prevent reading the whole response body when the IO returned by
Down.open
is closed.
- Require
net/http
-
Improve
Down::ChunkedIO
(and thusDown.open
):-
#each_chunk
and#read
now automatically call:on_close
when all chunks were downloaded -
#eof?
had incorrect behaviour, where it would return true if everything was downloaded, instead only when it's also at the end of the file -
#close
can now be called multiple times, as the:on_close
will always be called only once -
end of download is now detected immediately when the last chunk was downloaded (as opposed to after trying to read the next one)
-
-
Add
Down.open
for IO-like streaming, and deprecateDown.stream
(janko-m) -
Allow URLs with basic authentication (
http://user:password@example.com
) (janko-m)
-
Make Down work on Windows (martinsefcik)
-
Close an internal file descriptor that was left open (martinsefcik)
-
Add ability to follow redirects, and allow maximum of 2 redirects by default (janko-m)
-
Fix a potential Windows issue when extracting
#original_filename
(janko-m) -
Fix
#original_filename
being incomplete if filename contains a slash (janko-m)
-
Make
:progress_proc
and:content_length_proc
work with:max_size
(janko-m) -
Deprecate
:progress
in favor of open-uri's:progress_proc
(janko-m) -
Deprecate
:timeout
in favor of open-uri's:open_timeout
and:read_timeout
(janko-m) -
Add
Down.stream
for streaming remote files in chunks (janko-m) -
Replace deprecated
URI.encode
withCGI.unescape
in downloaded file's#original_filename
(janko-m)
- Add error message when file was to large, and use a simple error message for other generic download failures (janko-m)
-
Fix an issue where valid URLs were transformed into invalid URLs (janko-m)
- All input URLs now have to be properly encoded, which should already be the case in most situations.
-
Include the error class when download fails (janko-m)
- Forward all additional options to open-uri (janko-m)
- Move the open-uri file to the new location instead of copying it (janko-m)
- Delete the old open-uri file after using it (janko-m)
-
Fix
#download
and#copy_to_tempfile
not preserving the file extension (janko-m) -
Fix
#copy_to_tempfile
not working when given a nested basename (janko-m)
- Fix Down not working with Ruby 1.9.3 (janko-m)
- Don't allow redirects when downloading files (janko-m)