-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(http1): Add support for writing Trailer Fields #3375
Conversation
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.
Thanks. It looks good to me. I left some comments.
- use more idiomatic expressions - add TE as invalid header - add tests for encode_trailers - fix bug in encode_trailers when buffer is empty
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.
Thank you the feedback. I fixed most suggestions and explained my use of drain
.
- remove uncessary if statement - prefer into_iter() instead of drain() - prefer !vec.is_empty() to vec.len() > 0 - add another test for multiple trailer headers in single response
- remove unnecessary into_iter
@hjr3 Thank you! Looks good from my point of view. |
According to the ci log, the miri test ci seems to fail inside |
I noticed this as well. The write headers function looks pretty basic so I figured it would be upstream. |
Excellent work, and thanks for the review too! I aim to release 1.0 on Wednesday, and then merge this after that dust settles, just to prevent introducing any bugs at the last second. |
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.
Awesome work, thanks again! 🥳
…yperium#3375) Closes hyperium#2719 Signed-off-by: Sven Pfennig <[email protected]>
Closes #2719