Fix an issue with using non-reusable body types with redirects (#19134)

Closes #19131
Closes #19039

fixes the broken auto-updater.

I had the bright idea of using streams as the most common unit of data
transfer. Unfortunately, streams are not re-usable. So HTTP redirects
that have a stream body (like our remote server and auto update
downloads), don't redirect, as they can't reuse the stream. This PR
fixes the problem and simplifies the AsyncBody implementation now that
we're not using Isahc.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-12 13:32:08 -07:00 committed by GitHub
parent 9e14fd915f
commit b2e844f2ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 59 additions and 67 deletions

2
Cargo.lock generated
View file

@ -5529,13 +5529,13 @@ name = "http_client"
version = "0.1.0"
dependencies = [
"anyhow",
"bytes 1.7.1",
"derive_more",
"futures 0.3.30",
"http 1.1.0",
"log",
"serde",
"serde_json",
"smol",
"url",
]