Skip to content

Releases: sagebind/isahc

Pulling a fast one

23 Mar 03:18
Compare
Choose a tag to compare

This release contains some minor performance improvements as a result of some internal changes.

Changed

  • Switch agent from curl-provided select(2) backend to polling. This delivers some throughput improvements in some benchmarks involving concurrent requests. This also removes Isahc's reliance on loopback UDP sockets for selector wakeups. (#17, #243, #263) @sagebind
  • Refactor request configuration internal representation. This offered a minor performance improvement in some cases by greatly reducing the amount of hashmap lookups needed for applying request configuration. (#292) @sagebind

Dependency Updates

Consume API and async JSON

30 Jan 18:24
Compare
Choose a tag to compare

Added

  • Add async json() response convenience method to deserialize JSON asynchronous responses to mirror the synchronous one. (#245, #291)
  • Add consume API for reading response bodies fully before discarding them. (#257, #284)

Fixed

  • Update sluice to pull in race condition bugfix. (#295)

Cookie quote parsing bugfix

11 Jan 00:20
dacdad2
Compare
Choose a tag to compare

Fixed

Dependency Updates

Improve HTTP/1.x header compatibility

01 Jan 19:17
8890faf
Compare
Choose a tag to compare

Fixed

  • Headers for HTTP/1.x are now always sent with a single trailing space after the colon (:). While not strictly necessary according to RFC 7230, it was uncommon formatting and poorly-written servers can choke on parsing such headers. (#286, #287)

Implement Send for async copy_to

31 Dec 06:31
0329952
Compare
Choose a tag to compare

Fixed

  • Update future type returned by AsyncReadResponseExt::copy_to to implement Send if both the reader and writer types implement Send. This allows it to work with multithreaded runtimes. (#283, #285)

1.0.0

29 Dec 20:30
Compare
Choose a tag to compare

Breaking Changes

  • The Body type has now been broken up into distinct AsyncBody and Body types, with the former implementing only AsyncRead and the latter implementing only Read. This was done to reduce confusion on how to produce and consume body content when in an asynchronous context without blocking. This also makes it possible to use synchronous Read sources such as a File as a request body when using the synchronous API, something that was previously difficult to do. (#202, #262)
  • Methods on the ResponseExt trait related to reading the response body have been extracted into two new extension traits: AsyncReadResponseExt and ReadResponseExt. Like the previous change, this was done to reduce confusion on which methods to use when consuming a response in an async context. The _async suffix previously used to distinguish between the sync and async methods has been dropped, as it is no longer necessary. (#202, #262)
  • The Error type has been significantly refactored and changed into a struct with a separate ErrorKind enum. This was done to make it possible to add new errors without breaking changes, and to ensure that errors can always preserve upstream causes efficiently. The error kinds have also been updated to be clearer and more distinct. (#182, #258)
  • The bytes crate is no longer a dependency and Body::from_maybe_shared has been removed. (#261)
  • Configurable::dns_servers has been removed, as it is more likely to confuse users more than anything since it requires libcurl to be compiled with c-ares, which it isn't by default and is unlikely to be.
  • Removed Request, Response, and HttpClient from the prelude module. You will now have to import these directly. Importing large prelude modules can make code more confusing to read and is usually considered an anti-pattern. (#281)

Fixed

  • Fix warning for aborting response body stream early being emitted inconsistently. Also change from a WARN to an INFO log. (#280)

Other Changes

  • The minimum supported Rust version (MSRV) is now pinned to 1.41. (#259)
  • Add post_async example usage and improve various method docs. (#273)
  • Add rustfmt config and apply rustfmt to the entire codebase. (#276, #277)
  • Add Clippy checks to CI. (#279)

Dependency Updates

  • Update Public Suffix List to f9f612a (#266)
  • Update flume requirement from 0.9 to 0.10 (#271)

1.0.0-beta.1

09 Dec 05:58
Compare
Choose a tag to compare
1.0.0-beta.1 Pre-release
Pre-release

Breaking Changes

  • The Body type has now been broken up into distinct AsyncBody and Body types, with the former implementing only AsyncRead and the latter implementing only Read. This was done to reduce confusion on how to produce and consume body content when in an asynchronous context without blocking. This also makes it possible to use synchronous Read sources such as a File as a request body when using the synchronous API, something that was previously difficult to do. (#202, #262)
  • Methods on the ResponseExt trait related to reading the response body have been extracted into two new extension traits: AsyncReadResponseExt and ReadResponseExt. Like the previous change, this was done to reduce confusion on which methods to use when consuming a response in an async context. The _async suffix previously used to distinguish between the sync and async methods has been dropped, as it is no longer necessary. (#202, #262)
  • The Error type has been significantly refactored and changed into a struct with a separate ErrorKind enum. This was done to make it possible to add new errors without breaking changes, and to ensure that errors can always preserve upstream causes efficiently. The error kinds have also been updated to be clearer and more distinct. (#182, #258)
  • The bytes crate is no longer a dependency and Body::from_maybe_shared has been removed. (#261)
  • Configurable::dns_servers has been removed, as it is more likely to confuse users more than anything since it requires libcurl to be compiled with c-ares, which it isn't by default and is unlikely to be.

Other Changes

  • The minimum supported Rust version (MSRV) is now pinned to 1.41. (#259)

Dependency Updates

Body length fix for compressed responses

09 Dec 05:10
Compare
Choose a tag to compare

Fixed

  • Fix body length incorrectly returning the length of the compressed body when the server combines compression and Content-Length with auto decompression enabled. (#265, #267)

Configure IP version and another redirect bugfix

14 Nov 20:54
6c97805
Compare
Choose a tag to compare

Added

  • Add Configurable::ip_version which allows you to restrict resolving hostnames to a specific IP version. (#252, #253) @ArenM

Fixed

  • Fix redirect handling with redirect responses that include non-empty bodies, another regression introduced in 0.9.11. (#250, #255) @sagebind

Changed

Redirect policy fix

11 Nov 02:05
7a3993d
Compare
Choose a tag to compare

Fixed

  • Fix a regression introduced in 0.9.11 resulting in client-wide redirect policies not being respected. (#250, #251) @sagebind

Changed

Dependency Updates