-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Expose HTTP/2 HpackDecoder #6589
Conversation
Motivation: gRPC (and potentially other libraries) has an optimized header processor that requires direct access to the HpackDecoder. Modifications: Make the HpackDecoder and its constructors public. Result: Fixes netty#6579
@@ -49,7 +49,7 @@ | |||
import static io.netty.util.internal.ObjectUtil.checkPositive; | |||
import static io.netty.util.internal.ThrowableUtil.unknownStackTrace; | |||
|
|||
final class HpackDecoder { | |||
public class HpackDecoder { |
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 we make it public again can we at least make it final ?
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.
Yup - done. I wasn't sure at first whether gRPC needed to extend but it looks like it doesn't.
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.
Instead of exposing the details of HPACK would it be sufficient to make the headers created by DefaultHttp2HeadersDecoder extensible? DefaultHttp2HeadersDecoder
is already public, and it looks like GrpcHttp2HeadersDecoder
has some duplication anyways.
this(maxHeaderListSize, initialHuffmanDecodeCapacity, DEFAULT_HEADER_TABLE_SIZE); | ||
} | ||
|
||
/** | ||
* Exposed Used for testing only! Default values used in the initial settings frame are overriden intentionally | ||
* for testing but violate the RFC if used outside the scope of testing. | ||
*/ | ||
HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity, int maxHeaderTableSize) { | ||
public HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity, int maxHeaderTableSize) { |
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.
having this be public can be dangerous as indicated in the comments. Can this stay package private?
Lets track followup discussion in #6591 |
This reverts commit f4c635d.
This reverts commit f4c635d.
Motivation: gRPC (and potentially other libraries) has an optimized header processor that requires direct access to the HpackDecoder. Modifications: Make the HpackDecoder and its constructors public. Result: Fixes netty#6579
This reverts commit f4c635d.
Motivation: gRPC (and potentially other libraries) has an optimized header processor that requires direct access to the HpackDecoder. Modifications: Make the HpackDecoder and its constructors public. Result: Fixes netty#6579
This reverts commit f4c635d.
Motivation:
gRPC (and potentially other libraries) has an optimized header processor that requires direct access to the HpackDecoder.
Modifications:
Make the HpackDecoder and its constructors public.
Result:
Fixes #6579