-
Notifications
You must be signed in to change notification settings - Fork 47
Chunked trailer #335
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
Merged
Chunked trailer #335
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
115ce19
chunked trailer
ilevyor bfa3949
Merge branch 'main' into chunked_trailer
ilevyor 927e781
trailer
ilevyor 2ce2b15
chunked trailers attempt 1
ilevyor 44bd492
headers_to_buffer
ilevyor 4be940a
header_size error
ilevyor bfcf2a7
review addressed
ilevyor 5972765
updates
ilevyor 49c2c33
fix leak
ilevyor e96af02
initialize size
ilevyor 42cb7c9
remove mem_release
ilevyor 326befc
fix header counter
ilevyor 2ecd902
check for proper trailing headers.
ilevyor c9b4bd5
remove unnecessary comment
ilevyor a3f64f9
Merge branch 'main' into chunked_trailer
ilevyor 43187bb
miscilaneous edits
ilevyor 8085e27
add tests, and http headers
ilevyor b891ab0
debug test
ilevyor 01364c8
make tests wrong and fail on my machine, but pass CI?
ilevyor 291d340
fix carriage return
ilevyor 6b2a7d6
log carriage return
ilevyor 4f35127
fix logging
ilevyor 9ca29b3
more logging
ilevyor b257a83
even more logging
ilevyor 5db1854
remove unnecessary logging
ilevyor 97337ce
add missing carriage return to empty trailer
ilevyor 01315bc
Merge branch 'main' into chunked_trailer
ilevyor 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
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.
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.
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.
YES it is great to do null-checks on destroy() functions.
Imagine a
thingclass with 3 members inside it:a, b, cand any of those 3 members could fail during creation. If destroy() functions didn't check NULL, then error-handling in the thing_new() function looks like this (a bit annoying to do so many null-checks, and a little error-prone):or you avoid the if-checks by having distinct
gotolabels like, and tear things down in reverse-init order which is (VERY FRAGILE AND EASY TO SCREW UP):but if we know that destroy() functions check for null, then we can just be simple and do like:
or even better, just have the thing call its own destructor:
and since I'm documenting every possible error handling strategy, here's the very worst: If, at any step things go wrong, try to clean up each previous step:
which is UNGODLY FRAGILE and hard to get right
and that, boys and girls, is why we use
gotoin CUh 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.
If you check for the nulls, just having a destroy_thing function wouldn't do the same as
But allow you to return to the place you called for the destroy? Not looking in this particular code, just in general.
Use case would be to emit log, or put an assert or some other thing after the destroy is executed.