-
Notifications
You must be signed in to change notification settings - Fork 972
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
HTTPCLIENT-2277: RFC 9111 conformance improvements / bug fixes #501
Conversation
ok2c
commented
Nov 4, 2023
•
edited
Loading
edited
- Aligns the behavior of the caching protocol handlers with the specification requirements (sections 3 and 4 RFC 9111)
- Improved normalization of variant header elements
- Bug fixes
…he entry per RFC 9111 section 3.5
… requirements per RFC 9111 section 3
@arturobernalg This PR is still work in progress. Do take a look at the changes in |
31fbaee
to
d37aba9
Compare
@arturobernalg Please review. |
I haven't forgotten about this PR. |
8c1de25
to
6f4fc08
Compare
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.
@ok2c this change-set LGTM
@Internal | ||
public static void normalizeElements(final Iterator<Header> iterator, final Consumer<String> consumer) { | ||
final List<HeaderElement> elements = new ArrayList<>(); | ||
final Iterator<HeaderElement> it = new BasicHeaderElementIterator(iterator); |
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.
We can streamline the process by using StreamSupport.stream
to create a stream directly from the Iterator<HeaderElement>
. This approach eliminates the need for an intermediate collection and allows us to process elements in a single pipeline, which is more memory-efficient and idiomatic to the stream API.
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.
@arturobernalg Agreed. Corrected. Please take another look.
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.
@arturobernalg Agreed. Corrected. Please take another look.
Perfect. LGTM
…ecification requirements per RFC 9111 section 4
…the specification requirements per RFC 9111 section 4
… the current request message with additional headers generated by the previous request interceptors instead of the original request message
c4e0332
to
b69472a
Compare