-
Notifications
You must be signed in to change notification settings - Fork 674
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
[WIP] Jetty12 + EE10 #2876
base: main
Are you sure you want to change the base?
[WIP] Jetty12 + EE10 #2876
Changes from all commits
d1c5e55
af5a296
9b533ed
480f8f7
b5e6cff
72f4457
a86505e
b46987f
b7e33ca
e6ca759
4bf733b
9569b95
fb3a0e0
83a5d05
760b0c9
029dc5b
a2cba05
90316c3
59e28b0
d8fd76d
0ce563e
1b8894e
70754d8
4409b27
336f0d3
0189004
d8b3d00
90853fc
a718562
9f8f9c5
fd24abc
30f4bd6
5e1bc75
dbc0a08
930d17f
a3a8acc
3ed7ddf
b42274e
7de517b
66d5d1d
716ee09
5425d73
a1e67bc
d3594a4
7bd7259
31e58a1
dfe667f
a20d775
69d5831
6ca7d16
e3f30c6
1413157
9634c1c
fa2c41e
8ba85f5
52adc6f
d4a905d
ea09711
bc20356
f0cfc42
60308aa
35acabe
894b52f
72c9cf9
be9b7fb
62e1249
8fb561f
c3c2f1c
f7d900b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
[versions] | ||
adobe-testing-s3mock = "2.17.0" | ||
amazon-awssdk = "2.26.19" | ||
adobe-testing-s3mock = "3.9.1" | ||
amazon-awssdk = "2.28.11" | ||
# @keep Antora version used in ref-guide | ||
antora = "3.1.4" | ||
# @keep Most recent commit as of 2022-06-24, this repo does not have tags | ||
|
@@ -81,8 +81,9 @@ cybozulabs-langdetect = "1.1-20120112" | |
diffplug-spotless = "6.5.2" | ||
dropwizard-metrics = "4.2.26" | ||
eclipse-ecj = "3.39.0" | ||
eclipse-jetty = "10.0.22" | ||
eclipse-jettytoolchain = "4.0.6" | ||
# eclipse-jetty = "10.0.22" | ||
eclipse-jetty = "12.0.10" | ||
eclipse-jettytoolchain = "5.0.2" | ||
# @keep jgit version used by git-status.gradle | ||
eclipse-jgit = "6.7.0.202309050840-r" | ||
fasterxml = "2.18.0" | ||
|
@@ -125,6 +126,7 @@ immutables-valueannotations = "2.10.1" | |
j256-simplemagic = "1.17" | ||
jakarta-annotation = "2.1.1" | ||
jakarta-inject = "2.0.1" | ||
jakarta-servlet = "6.0.0" | ||
jakarta-ws = "3.1.0" | ||
# @keep This is the minimum required Java version for the project. | ||
java-min = "21" | ||
|
@@ -137,7 +139,7 @@ jayway-jsonpath = "2.9.0" | |
jctools = "4.0.5" | ||
jersey = "3.1.9" | ||
# TODO Sync with jersey versions | ||
jersey-containers = "2.39.1" | ||
jersey-containers = "3.1.0" | ||
# @keep for version alignment | ||
joda-time = "2.8.1" | ||
junit = "4.13.2" | ||
|
@@ -288,7 +290,7 @@ bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk18on", version.ref | |
carrot2-core = { module = "org.carrot2:carrot2-core", version.ref = "carrot2-core" } | ||
carrotsearch-hppc = { module = "com.carrotsearch:hppc", version.ref = "carrotsearch-hppc" } | ||
carrotsearch-randomizedtesting-runner = { module = "com.carrotsearch.randomizedtesting:randomizedtesting-runner", version.ref = "carrotsearch-randomizedtesting" } | ||
# @keep transitive dependency for version alignment | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why this changed |
||
# @keep transitive depenxdency for version alignment | ||
checkerframework-qual = { module = "org.checkerframework:checker-qual", version.ref = "checkerframework" } | ||
codehaus-woodstox-stax2api = { module = "org.codehaus.woodstox:stax2-api", version.ref = "codehaus-woodstox" } | ||
commonscli-commonscli = { module = "commons-cli:commons-cli", version.ref = "commons-cli" } | ||
|
@@ -298,33 +300,40 @@ commonsio-commonsio = { module = "commons-io:commons-io", version.ref = "commons | |
cybozulabs-langdetect = { module = "com.cybozu.labs:langdetect", version.ref = "cybozulabs-langdetect" } | ||
dropwizard-metrics-core = { module = "io.dropwizard.metrics:metrics-core", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-graphite = { module = "io.dropwizard.metrics:metrics-graphite", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-jetty10 = { module = "io.dropwizard.metrics:metrics-jetty10", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-jetty12 = { module = "io.dropwizard.metrics:metrics-jetty12", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-jetty12-ee10 = { module = "io.dropwizard.metrics:metrics-jetty12-ee10", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-jmx = { module = "io.dropwizard.metrics:metrics-jmx", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-jvm = { module = "io.dropwizard.metrics:metrics-jvm", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-servlets", version.ref = "dropwizard-metrics" } | ||
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-jakarta-servlets", version.ref = "dropwizard-metrics" } | ||
eclipse-jdt-ecj = { module = "org.eclipse.jdt:ecj", version.ref = "eclipse-ecj" } | ||
eclipse-jetty-alpnjavaclient = { module = "org.eclipse.jetty:jetty-alpn-java-client", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-alpnjavaserver = { module = "org.eclipse.jetty:jetty-alpn-java-server", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-alpnserver = { module = "org.eclipse.jetty:jetty-alpn-server", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-client = { module = "org.eclipse.jetty:jetty-client", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-deploy = { module = "org.eclipse.jetty:jetty-deploy", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-ee = { module = "org.eclipse.jetty:jetty-ee", version.ref = "eclipse-jetty" } | ||
# clipse-jetty-ee10-nested = { module = "org.eclipse.jetty.ee10:jetty-ee10-nested", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-ee10-servlet = { module = "org.eclipse.jetty.ee10:jetty-ee10-servlet", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-ee10-servlets = { module = "org.eclipse.jetty.ee10:jetty-ee10-servlets", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-ee10-webapp = { module = "org.eclipse.jetty.ee10:jetty-ee10-webapp", version.ref = "eclipse-jetty" } | ||
# eclipse-jetty-ee8-webapp = { module = "org.eclipse.jetty.ee8:jetty-ee8-webapp", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http = { module = "org.eclipse.jetty:jetty-http", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:http2-client", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:http2-common", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:http2-hpack", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:http2-http-client-transport", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:http2-server", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:jetty-http2-client", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:jetty-http2-common", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:jetty-http2-hpack", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:jetty-http2-client-transport", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:jetty-http2-server", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-io = { module = "org.eclipse.jetty:jetty-io", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-jmx = { module = "org.eclipse.jetty:jetty-jmx", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-jndi = { module = "org.eclipse.jetty:jetty-jndi", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-plus = { module = "org.eclipse.jetty:jetty-plus", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-rewrite = { module = "org.eclipse.jetty:jetty-rewrite", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-security = { module = "org.eclipse.jetty:jetty-security", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-server = { module = "org.eclipse.jetty:jetty-server", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-servlet = { module = "org.eclipse.jetty:jetty-servlet", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-servlets = { module = "org.eclipse.jetty:jetty-servlets", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-session = { module = "org.eclipse.jetty:jetty-session", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-start = { module = "org.eclipse.jetty:jetty-start", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-toolchain-servletapi = { module = "org.eclipse.jetty.toolchain:jetty-servlet-api", version.ref = "eclipse-jettytoolchain" } | ||
eclipse-jetty-toolchain-servletapi = { module = "org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api", version.ref = "eclipse-jettytoolchain" } | ||
eclipse-jetty-util = { module = "org.eclipse.jetty:jetty-util", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-webapp = { module = "org.eclipse.jetty:jetty-webapp", version.ref = "eclipse-jetty" } | ||
eclipse-jetty-xml = { module = "org.eclipse.jetty:jetty-xml", version.ref = "eclipse-jetty" } | ||
eclipse-jgit-jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version.ref = "eclipse-jgit" } | ||
fasterxml-jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version.ref = "fasterxml" } | ||
|
@@ -386,6 +395,7 @@ immutables-valueannotations = { module = "org.immutables:value-annotations", ver | |
j256-simplemagic = { module = "com.j256.simplemagic:simplemagic", version.ref = "j256-simplemagic" } | ||
jakarta-annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version.ref = "jakarta-annotation" } | ||
jakarta-inject-api = { module = "jakarta.inject:jakarta.inject-api", version.ref = "jakarta-inject" } | ||
jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet" } | ||
jakarta-ws-rsapi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "jakarta-ws" } | ||
javacc-javacc = { module = "net.java.dev.javacc:javacc", version.ref = "javacc" } | ||
# @keep transitive dependency for version alignment | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ | |
import static org.apache.solr.servlet.SolrDispatchFilter.Action.REMOTEQUERY; | ||
|
||
import io.opentelemetry.api.trace.Span; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import java.io.IOException; | ||
import java.lang.invoke.MethodHandles; | ||
import java.util.ArrayList; | ||
|
@@ -35,8 +37,6 @@ | |
import java.util.Locale; | ||
import java.util.Map; | ||
import java.util.Set; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import net.jcip.annotations.ThreadSafe; | ||
import org.apache.solr.client.solrj.SolrRequest; | ||
import org.apache.solr.common.SolrException; | ||
|
@@ -434,7 +434,12 @@ protected void executeCoreRequest(SolrQueryResponse rsp) { | |
// SolrCore counter | ||
core.close(); | ||
core = null; | ||
response.getHeaderNames().stream().forEach(name -> response.setHeader(name, null)); | ||
// Skip specific headers | ||
// workaround for response.setHeader(name, null) | ||
response.getHeaderNames().stream() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good for now IMO. Longer term I'd love to see this code go away in favor of having the v2 API stuff get handled by its own servlet, but we're pretty far from that being workable for now. It is a little hacky in the interim though 😦 |
||
.filter(name -> !name.equalsIgnoreCase("Content-Length")) | ||
.forEach(name -> response.setHeader(name, "")); | ||
response.setContentLength(-1); | ||
invokeJerseyRequest( | ||
cores, null, cores.getJerseyApplicationHandler(), cores.getRequestHandlers(), rsp); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,9 +100,14 @@ public class ShowFileRequestHandler extends RequestHandlerBase implements Permis | |
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
static { | ||
KNOWN_MIME_TYPES = new HashSet<>(MimeTypes.getKnownMimeTypes()); | ||
KNOWN_MIME_TYPES = new HashSet<>(); | ||
for (MimeTypes.Type type : MimeTypes.Type.values()) { | ||
KNOWN_MIME_TYPES.add(type.toString()); | ||
} | ||
KNOWN_MIME_TYPES.add("text/xml"); | ||
KNOWN_MIME_TYPES.add("text/javascript"); | ||
KNOWN_MIME_TYPES.add("text/csv"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did csv/xhtml get added? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Starting from Jetty 11 these two mime types are not included in |
||
KNOWN_MIME_TYPES.add("application/xhtml+xml"); | ||
} | ||
|
||
public ShowFileRequestHandler() { | ||
|
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 would go with jersey version 3.1.9 if possible, so that we can remove this entry completely (see line above).