feat: add configurable Alt-Svc handler for HTTP/3 alternative service discovery#2910
feat: add configurable Alt-Svc handler for HTTP/3 alternative service discovery#2910Harshal96 wants to merge 3 commits into
Conversation
|
@Harshal96 thanks for the contribution, the code is missing the support of HTTP/2 that works differently than with a HTTP header, I recommend you read the ALT-SVC RFC to learn more about this. For that matter you should look at |
|
@vietj done, can you please take a look now? |
|
@vietj is this good for another review? |
| * Options for configuring {@link AltSvcHandler}. | ||
| */ | ||
| @DataObject | ||
| @JsonGen(publicConverter = false) |
There was a problem hiding this comment.
we actually don't need JsonGen annotation here, there is no interested in having a converter for this
| public class AltSvcHandlerImpl implements AltSvcHandler { | ||
|
|
||
| private final Map<String, String> origins; | ||
| private final Map<HttpConnection, Set<String>> announcedOrigins = new WeakHashMap<>(); |
There was a problem hiding this comment.
I think we cannot reasonnably maintain such a map because it will never be cleaned from stale connections, so we need to find a way to do that properly.
There was a problem hiding this comment.
updated to remove stale connections
Motivation:
Adds a new
AltSvcHandlerandAltSvcOptionsAPI for advertising HTTP Alternative Services from Vert.x Web routes.This enables applications to declaratively send
Alt-Svcresponse headers for configured origins, which is useful for HTTP/3 discovery. For example:Fixes #2847