-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src,http2: DRY header/trailer handling code up #14688
src,http2: DRY header/trailer handling code up #14688
Conversation
Remove duplicate code through minor refactoring.
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.
LGTM with a suggestion.
src/node_http2_core.h
Outdated
virtual void OnFreeSession() {} | ||
virtual void AllocateSend(size_t suggested_size, uv_buf_t* buf) = 0; | ||
|
||
virtual bool HasGetPaddingCallback() { return false; } | ||
|
||
class SubmitTrailers { | ||
public: | ||
void operator ()(nghttp2_nv* trailers, size_t length) const; |
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.
Making this a normal method called .Send()
or whatever is clearer, IMO. No risk of confusing method calls with plain function calls.
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.
Woo! 🎈
Landed in d98606f |
Remove duplicate code through minor refactoring. PR-URL: #14688 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Remove duplicate code through minor refactoring. PR-URL: nodejs#14688 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Remove duplicate code through minor refactoring. PR-URL: #14688 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Remove duplicate code through minor refactoring.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src/http2