-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow a ConnectionFactory (eg SslConnectionFactory) to automatically add a Customizer #4815
Allow a ConnectionFactory (eg SslConnectionFactory) to automatically add a Customizer #4815
Conversation
@lachlan-roberts look at what I've done with |
What happens when you mix |
Spun out |
@joakime I don't think it matters, but probably should be reviewed carefully. |
Redo of this PR without Attributes improvements (moved to #4816). Add a ConnectionFactory.Configuring interface to all connectors to be configured during doStart. I have some concern about shared HttpConfigurations. Signed-off-by: Greg Wilkins <gregw@webtide.com>
331e8da
to
57a02bd
Compare
I have forced pushed this PR with only the I still have a bit of a concern how this approach might affect any shared HttpConfiguration instances? |
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.
Looks mostly ok, but there is no test that calls setEnsureSecureRequestCustomizer()
. The implementation is quite trivial though, so maybe there is no need to.
Please update the javadocs before merge.
@@ -125,4 +125,16 @@ | |||
*/ | |||
Detection detect(ByteBuffer buffer); | |||
} | |||
|
|||
/** | |||
* A ConnectionFactory that can configure the connector. |
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.
Please fix the javadoc, as Configuring
is not a ConnectionFactory
.
Unless, only a ConnectionFactory
can implement Configuring
.
If something else can, then the javadoc needs to be fixed, something like: "Implementing this class allows to configure the connector (or its component tree) at connector startup".
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.
I'll make it extend ConnectionFactory like the other 'ing' inner interfaces
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.
I meant to request the javadocs changes and a clarification of who can implement Configuring
.
@gregw this is a draft PR - still needs to be draft? |
@sbordet It is draft as I wanted to get feedback on the approach with regards to adding a customizer to a potentially shared HttpConfiguration. |
@gregw the However, the PR also handles the case where HTTP/1.1 and HTTP/2 have been configured with two different If you want to manually configure the So I think we're good. |
Signed-off-by: Greg Wilkins <gregw@webtide.com>
…4814-ConfiguringConnectionFactory
This PR for #4814 adds a
Connector.Configuring
interface to allow theSslConnectionFactory
to ensure there is aSecureRequestCustomizer
.I have made this a draft as I'm a bit worried about modifying shared
HttpConfiguration
instances... not sure if it is a concern and if it is, what to do about it?There is also a good optimisation of the request attributes for SSL (probably should be a different PR... maybe even back ported to 9.4).