-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fetch, tls, and http fixes #24740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+172
−155
Merged
fetch, tls, and http fixes #24740
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5ce8e93
std.http.Client: fix fetching by adding a buffer
andrewrk af2ac24
Fetch: handle compressed git+http
andrewrk 6244f5c
std.http.bodyReader: add missing flush in endUnflushed
andrewrk d7bf608
Fetch: make FetchStream live longer
andrewrk 8721efe
std.crypto.tls.Client: always write to buffer
andrewrk 8da645c
Fetch: fix FetchStream logic
andrewrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment mostly borne out of my own confusion: this concept of "buffer capacity" for
std.compress
seems to be defined in different ways many different places, and some of them appear to disagree with eachother.For
zstd
, these doc comments would lead me to believe thatdefault_window_len
is not enough:zig/lib/std/compress/zstd/Decompress.zig
Lines 35 to 36 in 3fb8684
zig/lib/std/compress/zstd/Decompress.zig
Lines 77 to 80 in 3fb8684
For
deflate
, these constants are just generally confusing to me:zig/lib/std/compress/flate.zig
Lines 3 to 8 in 3fb8684
Seems like some more definitive
recommended_buffer_size
ormin_buffer_size
constant should be defined per-compression-algorithm and used consistently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I've been figuring this stuff out as I go along and only just starting to get a handle of it. Once I'm confident in the flow chart I'll do another pass over the doc comments, constants, and make sure everything is clear and agrees with each other.
even in this PR you can see I changed the rules for Reader.stream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do all this stuff in a branch and only inflict it on master once I had a fully done, coherent change, but it's just too massive. everybody has to come along for the ride and suffer with me, sorry