Skip to content

Frojas+tgregory/upgrade misk to jetty 12 - #3847

Open
tgregory-block wants to merge 9 commits into
masterfrom
frojas+tgregory/upgrade-misk-to-jetty-12
Open

Frojas+tgregory/upgrade misk to jetty 12#3847
tgregory-block wants to merge 9 commits into
masterfrom
frojas+tgregory/upgrade-misk-to-jetty-12

Conversation

@tgregory-block

@tgregory-block tgregory-block commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Description

misk needs to be on a supported Jetty version

Testing Strategy

Existing test suite. The only test modifications made were for functionality that has changed or been removed in Jetty 12, e.g. MultiException was removed.

Checklist

  • I have reviewed this PR with relevant experts and/or impacted teams.
  • I have added tests to have confidence my changes work as expected.
  • I have a rollout plan that minimizes risks and includes monitoring for potential issues.

Thank you for contributing to Misk! 🎉

Add a mechanism for getting a HttpCall's HTTP version.

Update query param encoding test

Fix rebase

Appease projectHealth check

Make SocketAddress from method internal

Fix port conflict

Fix JettyHealthService

Switch to UriCompliance.LEGACY

Fix tests

Fix Http2ConnectivityTest

fix JettyServletUpstreamResponse

fix JettyService

fix imports

first pass upgrading deps and updating code
# Conflicts:
#	gradle/libs.versions.toml
#	misk/src/main/kotlin/misk/web/HttpCall.kt
#	misk/src/main/kotlin/misk/web/ServletHttpCall.kt
#	misk/src/main/kotlin/misk/web/jetty/JettyHealthService.kt
#	misk/src/main/kotlin/misk/web/jetty/JettyService.kt
#	misk/src/main/kotlin/misk/web/jetty/JettyServletUpstreamResponse.kt
#	misk/src/main/kotlin/misk/web/jetty/JettyWebSocket.kt
#	misk/src/main/kotlin/misk/web/jetty/WebActionsServlet.kt
#	misk/src/test/kotlin/misk/web/interceptors/RequestDeadlineInterceptorTest.kt
#	misk/src/test/kotlin/misk/web/jetty/WebActionsServletTest.kt
# Conflicts:
#	gradle/libs.versions.toml
#	misk/src/main/kotlin/misk/web/HttpCall.kt
@tgregory-block
tgregory-block force-pushed the frojas+tgregory/upgrade-misk-to-jetty-12 branch from 8bede42 to bf2d1a9 Compare June 18, 2026 16:45
@tgregory-block
tgregory-block marked this pull request as ready for review June 18, 2026 17:33
Jetty 12 derives the request's server authority from the connection's
local address when a request carries no Host/:authority
(ConnectionMetaData.getServerAuthority falls back to
getLocalSocketAddress). For a Unix domain socket that address is the
socket file path (e.g. /etc/sockets/istio-proxy.sock), which HostPort
rejects as an invalid authority: it logs "Bad Authority: [...]" and
throws, failing the request with a 400.

This bites authority-less requests such as the HTTP/2 prior-knowledge
preface ("PRI * HTTP/2.0"), which HttpStreamOverHTTP1 resolves before
the h2c upgrade -- and h2c defaults to true for UDS sockets. It also
bites any HTTP/1.0 request without a Host header. The failure happens
while building the request URI, before request customizers run, so
HostHeaderCustomizer cannot fix it; setting the fallback authority on
HttpConfiguration is the supported knob.

Set serverAuthority on a copy of the shared HttpConfiguration, scoped to
the Unix-domain connectors, so TCP connectors keep deriving their
authority from the (perfectly valid) local host:port. Requests that do
carry a Host/:authority continue to use their own value.

This mirrors the equivalent fix in Cash's service-container connector
factories and JSC's GenericServerConfigurator.
@MiskTest(startService = true) already starts the service; the field was
never read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants