Merge branch 'jetty-9.4.x' into jetty-9.4.x-cleanup-webapp-context
This commit is contained in:
commit
8c10d266b2
|
@ -1,95 +1,105 @@
|
|||
#!groovy
|
||||
|
||||
def mainJdk = "jdk8"
|
||||
def jdks = [mainJdk, "jdk11"]
|
||||
def oss = ["linux"]
|
||||
def builds = [:]
|
||||
for (def os in oss) {
|
||||
for (def jdk in jdks) {
|
||||
builds[os+"_"+jdk] = getFullBuild( jdk, os, mainJdk == jdk )
|
||||
}
|
||||
}
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage("Parallel Stage") {
|
||||
parallel {
|
||||
stage("Build / Test - JDK8") {
|
||||
agent { node { label 'linux' } }
|
||||
options { timeout(time: 120, unit: 'MINUTES') }
|
||||
steps {
|
||||
mavenBuild("jdk8", "-Pmongodb install")
|
||||
junit '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml'
|
||||
// Collect up the jacoco execution results (only on main build)
|
||||
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
||||
exclusionPattern: '' +
|
||||
// build tools
|
||||
'**/org/eclipse/jetty/ant/**' +
|
||||
',**/org/eclipse/jetty/maven/**' +
|
||||
',**/org/eclipse/jetty/jspc/**' +
|
||||
// example code / documentation
|
||||
',**/org/eclipse/jetty/embedded/**' +
|
||||
',**/org/eclipse/jetty/asyncrest/**' +
|
||||
',**/org/eclipse/jetty/demo/**' +
|
||||
// special environments / late integrations
|
||||
',**/org/eclipse/jetty/gcloud/**' +
|
||||
',**/org/eclipse/jetty/infinispan/**' +
|
||||
',**/org/eclipse/jetty/osgi/**' +
|
||||
',**/org/eclipse/jetty/spring/**' +
|
||||
',**/org/eclipse/jetty/http/spi/**' +
|
||||
// test classes
|
||||
',**/org/eclipse/jetty/tests/**' +
|
||||
',**/org/eclipse/jetty/test/**',
|
||||
execPattern: '**/target/jacoco.exec',
|
||||
classPattern: '**/target/classes',
|
||||
sourcePattern: '**/src/main/java'
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
|
||||
parallel builds
|
||||
|
||||
def getFullBuild(jdk, os, mainJdk) {
|
||||
return {
|
||||
node(os) {
|
||||
// System Dependent Locations
|
||||
def mvnName = 'maven3.5'
|
||||
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
|
||||
def settingsName = 'oss-settings.xml'
|
||||
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
||||
|
||||
stage("Build / Test - $jdk") {
|
||||
timeout(time: 120, unit: 'MINUTES') {
|
||||
// Checkout
|
||||
checkout scm
|
||||
withMaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
globalMavenSettingsConfig: settingsName,
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
// Testing
|
||||
sh "mvn -V -B install -Dmaven.test.failure.ignore=true -T5 -e -Djetty.testtracker.log=true -Pmongodb -Dunix.socket.tmp=" + env.JENKINS_HOME
|
||||
// Javadoc only
|
||||
sh "mvn -V -B javadoc:javadoc -T6 -e -Dmaven.test.failure.ignore=false"
|
||||
script {
|
||||
step([$class : 'MavenInvokerRecorder', reportsFilenamePattern: "**/target/invoker-reports/BUILD*.xml",
|
||||
invokerBuildDir: "**/target/its"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Report failures in the jenkins UI
|
||||
junit testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml'
|
||||
consoleParsers = [[parserName: 'JavaDoc'],
|
||||
[parserName: 'JavaC']]
|
||||
|
||||
if (mainJdk) {
|
||||
// Collect up the jacoco execution results
|
||||
def jacocoExcludes =
|
||||
// build tools
|
||||
"**/org/eclipse/jetty/ant/**" + ",**/org/eclipse/jetty/maven/**" +
|
||||
",**/org/eclipse/jetty/jspc/**" +
|
||||
// example code / documentation
|
||||
",**/org/eclipse/jetty/embedded/**" + ",**/org/eclipse/jetty/asyncrest/**" +
|
||||
",**/org/eclipse/jetty/demo/**" +
|
||||
// special environments / late integrations
|
||||
",**/org/eclipse/jetty/gcloud/**" + ",**/org/eclipse/jetty/infinispan/**" +
|
||||
",**/org/eclipse/jetty/osgi/**" + ",**/org/eclipse/jetty/spring/**" +
|
||||
",**/org/eclipse/jetty/http/spi/**" +
|
||||
// test classes
|
||||
",**/org/eclipse/jetty/tests/**" + ",**/org/eclipse/jetty/test/**"
|
||||
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
||||
exclusionPattern: jacocoExcludes,
|
||||
execPattern: '**/target/jacoco.exec',
|
||||
classPattern: '**/target/classes',
|
||||
sourcePattern: '**/src/main/java'
|
||||
consoleParsers = [[parserName: 'Maven'],
|
||||
[parserName: 'JavaDoc'],
|
||||
[parserName: 'JavaC']]
|
||||
|
||||
step([$class: 'MavenInvokerRecorder', reportsFilenamePattern: "**/target/invoker-reports/BUILD*.xml",
|
||||
invokerBuildDir: "**/target/its"])
|
||||
stage("Build / Test - JDK11") {
|
||||
agent { node { label 'linux' } }
|
||||
options { timeout(time: 120, unit: 'MINUTES') }
|
||||
steps {
|
||||
mavenBuild("jdk11", "-Pmongodb install")
|
||||
junit '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml'
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
}
|
||||
}
|
||||
|
||||
// Report on Maven and Javadoc warnings
|
||||
step([$class : 'WarningsPublisher',
|
||||
consoleParsers: consoleParsers])
|
||||
}
|
||||
stage("Build Javadoc") {
|
||||
agent { node { label 'linux' } }
|
||||
options { timeout(time: 30, unit: 'MINUTES') }
|
||||
steps {
|
||||
mavenBuild("jdk8", "install javadoc:javadoc -DskipTests")
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']]
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Compact3 - ${jdk}") {
|
||||
withMaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
globalMavenSettingsConfig: settingsName,
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
sh "mvn -f aggregates/jetty-all-compact3 -V -B -Pcompact3 clean install -T6"
|
||||
stage("Build Compact3") {
|
||||
agent { node { label 'linux' } }
|
||||
options { timeout(time: 120, unit: 'MINUTES') }
|
||||
steps {
|
||||
mavenBuild("jdk8", "-Pcompact3 install -DskipTests")
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To other developers, if you are using this method above, please use the following syntax.
|
||||
*
|
||||
* mavenBuild("<jdk>", "<profiles> <goals> <plugins> <properties>"
|
||||
*
|
||||
* @param jdk the jdk tool name (in jenkins) to use for this build
|
||||
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
|
||||
* @return the Jenkinsfile step representing a maven build
|
||||
*/
|
||||
def mavenBuild(jdk, cmdline) {
|
||||
def mvnName = 'maven3.5'
|
||||
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
|
||||
def settingsName = 'oss-settings.xml'
|
||||
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
||||
|
||||
withMaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
globalMavenSettingsConfig: settingsName,
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
// Some common Maven command line + provided command line
|
||||
sh "mvn -V -B -T3 -e -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
|
||||
}
|
||||
}
|
||||
|
||||
// vim: et:ts=2:sw=2:ft=groovy
|
53
VERSION.txt
53
VERSION.txt
|
@ -1,4 +1,51 @@
|
|||
jetty-9.4.13-SNAPSHOT
|
||||
jetty-9.4.15-SNAPSHOT
|
||||
|
||||
jetty-9.4.14.v20181114 - 14 November 2018
|
||||
+ 3097 Duplicated programmatic Servlet Listeners causing duplicate calls
|
||||
+ 3103 HttpClientLoadTest reports a leak in byte buffer
|
||||
+ 3104 Align jetty-schemas version within apache-jsp module as well
|
||||
|
||||
jetty-9.4.13.v20181111 - 11 November 2018
|
||||
+ 2191 JPMS Support
|
||||
+ 2431 Upgrade to Junit 5
|
||||
+ 2691 LdapLoginModule does not find accounts in subtrees
|
||||
+ 2702 ArithmeticException in Credentials.stringEquals and .byteEquals
|
||||
+ 2718 NPE using more than one Endpoint.publish
|
||||
+ 2727 Cleanup behavior of JMX MBean discovery
|
||||
+ 2740 Ensure OSGiWebappClassLoader uses bundleloader for all loadClass
|
||||
methods
|
||||
+ 2787 Use status code from nested BadMessageException wrapped in
|
||||
ServletException
|
||||
+ 2796 HTTP/2 max local stream count exceeded when request fails
|
||||
+ 2834 Support Java 11 bytecode during annotation scanning
|
||||
+ 2865 Update to apache jasper 8.5.33
|
||||
+ 2868 Adding SPNEGO authentication support for Jetty Client
|
||||
+ 2871 HTTP/2 Server reads -1 after client resets stream
|
||||
+ 2875 Fix WebSocketClient.connect() hang when attempting to connect at an
|
||||
invalid websocket endpoint
|
||||
+ 2886 SNI matching does not work in certain cases when there is only one CN
|
||||
certificate in the keystore
|
||||
+ 2901 Introduce HttpConnectionUpgrader as a conversation component in
|
||||
HttpClient
|
||||
+ 2903 Avoid Listener instantiation during QuickStart generation
|
||||
+ 2906 jetty-maven-plugin run goal adds output directory of reactor project
|
||||
dependencies to classpath without regard for scope
|
||||
+ 2912 Requests handled with GzipHandler should remove Content-Encoding and
|
||||
Content-Length headers
|
||||
+ 2913 Remove reliance on sun.reflect.Reflection to be compatible with Java 11
|
||||
+ 2936 Error during initial RequestDispatch with bad request query results in
|
||||
failure for ErrorHandler to process
|
||||
+ 2941 Upgrade to ASM 7 to support Java 11 bytecode
|
||||
+ 2954 Improve cause reporting for HttpClient failures
|
||||
+ 2970 Ensure HttpChannel.onComplete is always called
|
||||
+ 3018 Improve error handling and logging of min data rate violations
|
||||
+ 3023 Wrong non-redirect behaviour with "null" path info
|
||||
+ 3030 Enforce Content-Encoding check only on parameter extraction
|
||||
+ 3041 Cookies parsing in RFC2965 should allow deprecated comma separators
|
||||
+ 3049 Warn on common SslContextFactory problematic configurations
|
||||
+ 3054 Update OSGi to ASM 7
|
||||
+ 3090 MBeanContainer throws NPE for arrays
|
||||
+ 3092 Wrong classloader used to load *MBean classes
|
||||
|
||||
jetty-9.4.12.v20180830 - 30 August 2018
|
||||
+ 300 Implement Deflater / Inflater Object Pool
|
||||
|
@ -19,7 +66,7 @@ jetty-9.4.12.v20180830 - 30 August 2018
|
|||
+ 2398 MultiPartFormInputStream parsing should default to UTF-8, but allowed
|
||||
to be overridden by Request.setCharacterEncoding()
|
||||
+ 2468 EWYK concurrent produce can fail SSL connections
|
||||
+ 2501 Include accepting connections in connection limit.
|
||||
+ 2501 Include accepting connections in connection limit
|
||||
+ 2530 Client waits forever for cancelled large uploads
|
||||
+ 2560 Review PathResource exception handling
|
||||
+ 2565 HashLoginService silently ignores file:/ config paths from 9.3.x
|
||||
|
@ -33,7 +80,7 @@ jetty-9.4.12.v20180830 - 30 August 2018
|
|||
beans
|
||||
+ 2662 Remove unnecessary boxing conversions
|
||||
+ 2663 Guard Throwable.addSuppressed() calls
|
||||
+ 2672 Max local stream count exceeded for HttpClient with HTTP/2 transport
|
||||
+ 2672 Max local stream count exceeded for HttpClient with HTTP/2 transport
|
||||
+ 2675 Demo rewrite rules prevent URL Session tracking
|
||||
+ 2677 Decode URI before matching against "/favicon.ico"
|
||||
+ 2679 HTTP/2 Spec Compliance
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-jstl</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
<artifactId>examples-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
<artifactId>examples-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.eclipse.jetty.examples</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-client</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-server</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-alpn-parent</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-ant</artifactId>
|
||||
|
|
|
@ -1,92 +1,51 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-bom</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<name>Jetty :: Bom</name>
|
||||
<description>Jetty BOM artifact</description>
|
||||
<url>http://www.eclipse.org/jetty</url>
|
||||
<inceptionYear>1995</inceptionYear>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/eclipse/jetty.project/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache Software License - Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
</license>
|
||||
<license>
|
||||
<name>Eclipse Public License - Version 1.0</name>
|
||||
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<jetty.url>http://www.eclipse.org/jetty</jetty.url>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<build-support.version>1.4</build-support.version>
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/eclipse/jetty.project.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:eclipse/jetty.project.git</developerConnection>
|
||||
<url>https://github.com/eclipse/jetty.project</url>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>oss.sonatype.org</id>
|
||||
<name>Jetty Staging Repository</name>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>oss.sonatype.org</id>
|
||||
<name>Jetty Snapshot Repository</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<site>
|
||||
<id>jetty.eclipse.website</id>
|
||||
<url>scp://build.eclipse.org:/home/data/httpd/download.eclipse.org/jetty/${project.version}/</url>
|
||||
</site>
|
||||
</distributionManagement>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<configuration>
|
||||
<useReleaseProfile>false</useReleaseProfile>
|
||||
<goals>deploy</goals>
|
||||
<arguments>-Peclipse-release</arguments>
|
||||
<preparationGoals>clean install</preparationGoals>
|
||||
<mavenExecutorId>forked-path</mavenExecutorId>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<skipSource>true</skipSource>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
<flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
|
||||
<flattenMode>bom</flattenMode>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<pomElements>
|
||||
<build>remove</build>
|
||||
<properties>remove</properties>
|
||||
</pomElements>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten-clean</id>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
<phase>clean</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -94,413 +53,332 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jstl</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-java-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-java-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-openjdk8-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-openjdk8-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-conscrypt-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-conscrypt-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-ant</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-core</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-servlet</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<type>tar.gz</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>jetty-gcloud-session-manager</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-home</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-home</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<type>tar.gz</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-common</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-hpack</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-http-client-transport</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-infinispan</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-hazelcast</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.memcached</groupId>
|
||||
<artifactId>jetty-memcached-sessions</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-nosql</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot-jsp</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot-warurl</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-httpservice</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-quickstart</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-spring</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-unixsocket</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util-ajax</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>javax-websocket-client-impl</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>javax-websocket-server-impl</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-api</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-client</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-common</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-server</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-servlet</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-xml</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>gregw</id>
|
||||
<name>Greg Wilkins</name>
|
||||
<email>gregw@webtide.com</email>
|
||||
<organization>Webtide, LLC</organization>
|
||||
<organizationUrl>https://webtide.com</organizationUrl>
|
||||
<timezone>10</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>janb</id>
|
||||
<name>Jan Bartel</name>
|
||||
<email>janb@webtide.com</email>
|
||||
<organization>Webtide, LLC</organization>
|
||||
<organizationUrl>https://webtide.com</organizationUrl>
|
||||
<timezone>10</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jesse</id>
|
||||
<name>Jesse McConnell</name>
|
||||
<email>jesse.mcconnell@gmail.com</email>
|
||||
<organization>Webtide, LLC</organization>
|
||||
<organizationUrl>https://webtide.com</organizationUrl>
|
||||
<timezone>-6</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>joakime</id>
|
||||
<name>Joakim Erdfelt</name>
|
||||
<email>joakim.erdfelt@gmail.com</email>
|
||||
<organization>Webtide, LLC</organization>
|
||||
<organizationUrl>https://webtide.com</organizationUrl>
|
||||
<timezone>-6</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>sbordet</id>
|
||||
<name>Simone Bordet</name>
|
||||
<email>simone.bordet@gmail.com</email>
|
||||
<organization>Webtide, LLC</organization>
|
||||
<organizationUrl>https://webtide.com</organizationUrl>
|
||||
<timezone>1</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>djencks</id>
|
||||
<name>David Jencks</name>
|
||||
<email>david.a.jencks@gmail.com</email>
|
||||
<organization>IBM</organization>
|
||||
<timezone>-8</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>eclipse-release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<updateReleaseInfo>true</updateReleaseInfo>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-2</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-core</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-full-servlet</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-servlet</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cdi-websocket</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-cdi-webapp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.CookieManager;
|
||||
import java.net.CookiePolicy;
|
||||
import java.net.CookieStore;
|
||||
|
@ -70,6 +71,7 @@ import org.eclipse.jetty.util.SocketAddressResolver;
|
|||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
@ -179,12 +181,23 @@ public class HttpClient extends ContainerLifeCycle
|
|||
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
|
||||
{
|
||||
this.transport = transport;
|
||||
addBean(transport);
|
||||
|
||||
if (sslContextFactory == null)
|
||||
{
|
||||
sslContextFactory = new SslContextFactory(false);
|
||||
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
|
||||
}
|
||||
this.sslContextFactory = sslContextFactory;
|
||||
addBean(sslContextFactory);
|
||||
addBean(handlers);
|
||||
addBean(decoderFactories);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
dumpObjects(out, indent, new DumpableCollection("requestListeners", requestListeners));
|
||||
}
|
||||
|
||||
public HttpClientTransport getTransport()
|
||||
|
@ -204,34 +217,24 @@ public class HttpClient extends ContainerLifeCycle
|
|||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
if (sslContextFactory != null)
|
||||
addBean(sslContextFactory);
|
||||
|
||||
if (executor == null)
|
||||
{
|
||||
QueuedThreadPool threadPool = new QueuedThreadPool();
|
||||
threadPool.setName(name);
|
||||
executor = threadPool;
|
||||
addBean(executor);
|
||||
setExecutor(threadPool);
|
||||
}
|
||||
|
||||
|
||||
if (byteBufferPool == null)
|
||||
byteBufferPool = new MappedByteBufferPool(2048,
|
||||
executor instanceof ThreadPool.SizedThreadPool
|
||||
? ((ThreadPool.SizedThreadPool)executor).getMaxThreads()/2
|
||||
: ProcessorUtils.availableProcessors()*2);
|
||||
addBean(byteBufferPool);
|
||||
setByteBufferPool(new MappedByteBufferPool(2048,
|
||||
executor instanceof ThreadPool.SizedThreadPool
|
||||
? ((ThreadPool.SizedThreadPool)executor).getMaxThreads() / 2
|
||||
: ProcessorUtils.availableProcessors() * 2));
|
||||
|
||||
if (scheduler == null)
|
||||
scheduler = new ScheduledExecutorScheduler(name + "-scheduler", false);
|
||||
addBean(scheduler);
|
||||
|
||||
transport.setHttpClient(this);
|
||||
addBean(transport);
|
||||
setScheduler(new ScheduledExecutorScheduler(name + "-scheduler", false));
|
||||
|
||||
if (resolver == null)
|
||||
resolver = new SocketAddressResolver.Async(executor, scheduler, getAddressResolutionTimeout());
|
||||
addBean(resolver);
|
||||
setSocketAddressResolver(new SocketAddressResolver.Async(executor, scheduler, getAddressResolutionTimeout()));
|
||||
|
||||
handlers.put(new ContinueProtocolHandler());
|
||||
handlers.put(new RedirectProtocolHandler(this));
|
||||
|
@ -243,6 +246,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
cookieManager = newCookieManager();
|
||||
cookieStore = cookieManager.getCookieStore();
|
||||
|
||||
transport.setHttpClient(this);
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
|
@ -645,6 +649,9 @@ public class HttpClient extends ContainerLifeCycle
|
|||
*/
|
||||
public void setByteBufferPool(ByteBufferPool byteBufferPool)
|
||||
{
|
||||
if (isStarted())
|
||||
LOG.warn("Calling setByteBufferPool() while started is deprecated");
|
||||
updateBean(this.byteBufferPool, byteBufferPool);
|
||||
this.byteBufferPool = byteBufferPool;
|
||||
}
|
||||
|
||||
|
@ -796,6 +803,8 @@ public class HttpClient extends ContainerLifeCycle
|
|||
*/
|
||||
public void setExecutor(Executor executor)
|
||||
{
|
||||
if (isStarted())
|
||||
LOG.warn("Calling setExecutor() while started is deprecated");
|
||||
updateBean(this.executor, executor);
|
||||
this.executor = executor;
|
||||
}
|
||||
|
@ -813,6 +822,9 @@ public class HttpClient extends ContainerLifeCycle
|
|||
*/
|
||||
public void setScheduler(Scheduler scheduler)
|
||||
{
|
||||
if (isStarted())
|
||||
LOG.warn("Calling setScheduler() while started is deprecated");
|
||||
updateBean(this.scheduler, scheduler);
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
|
||||
|
@ -829,6 +841,9 @@ public class HttpClient extends ContainerLifeCycle
|
|||
*/
|
||||
public void setSocketAddressResolver(SocketAddressResolver resolver)
|
||||
{
|
||||
if (isStarted())
|
||||
LOG.warn("Calling setSocketAddressResolver() while started is deprecated");
|
||||
updateBean(this.resolver, resolver);
|
||||
this.resolver = resolver;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.io.Closeable;
|
|||
import java.io.IOException;
|
||||
import java.nio.channels.AsynchronousCloseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
@ -472,7 +471,7 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
|
|||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
dumpBeans(out, indent, new DumpableCollection("exchanges", exchanges));
|
||||
dumpObjects(out, indent, new DumpableCollection("exchanges", exchanges));
|
||||
}
|
||||
|
||||
public String asString()
|
||||
|
|
|
@ -18,16 +18,18 @@
|
|||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.api.Response;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
|
||||
/**
|
||||
* <p>A container for {@link ProtocolHandler}s accessible from {@link HttpClient#getProtocolHandlers()}.</p>
|
||||
*/
|
||||
public class ProtocolHandlers
|
||||
public class ProtocolHandlers implements Dumpable
|
||||
{
|
||||
private final Map<String, ProtocolHandler> handlers = new LinkedHashMap<>();
|
||||
|
||||
|
@ -91,4 +93,16 @@ public class ProtocolHandlers
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dump()
|
||||
{
|
||||
return Dumpable.dump(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
Dumpable.dumpObjects(out, indent, this, handlers);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.jetty.client.api.Result;
|
|||
import org.eclipse.jetty.http.HttpField;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.CountingCallback;
|
||||
import org.eclipse.jetty.util.Retainable;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
|
@ -122,13 +121,8 @@ public class ResponseNotifier
|
|||
else
|
||||
{
|
||||
CountingCallback counter = new CountingCallback(callback, contentListeners.size());
|
||||
Retainable retainable = callback instanceof Retainable ? (Retainable)callback : null;
|
||||
for (Response.AsyncContentListener listener : contentListeners)
|
||||
{
|
||||
if (retainable != null)
|
||||
retainable.retain();
|
||||
notifyContent(listener, response, buffer.slice(), counter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
package org.eclipse.jetty.client;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP;
|
||||
|
@ -30,6 +31,8 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
|||
import org.eclipse.jetty.util.SocketAddressResolver;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
@ -64,19 +67,32 @@ public abstract class AbstractHttpClientServerTest
|
|||
|
||||
protected void startClient(final Scenario scenario) throws Exception
|
||||
{
|
||||
startClient(scenario, new HttpClientTransportOverHTTP(1));
|
||||
startClient(scenario, null,null);
|
||||
}
|
||||
|
||||
protected void startClient(final Scenario scenario, HttpClientTransport transport) throws Exception
|
||||
protected void startClient(final Scenario scenario, HttpClientTransport transport, Consumer<HttpClient> config) throws Exception
|
||||
{
|
||||
QueuedThreadPool clientThreads = new QueuedThreadPool();
|
||||
clientThreads.setName("client");
|
||||
client = new HttpClient(transport, scenario.newSslContextFactory());
|
||||
client.setExecutor(clientThreads);
|
||||
if (transport==null)
|
||||
transport = new HttpClientTransportOverHTTP(1);
|
||||
|
||||
QueuedThreadPool executor = new QueuedThreadPool();
|
||||
executor.setName("client");
|
||||
Scheduler scheduler = new ScheduledExecutorScheduler("client-scheduler", false);
|
||||
client = newHttpClient(scenario, transport);
|
||||
client.setExecutor(executor);
|
||||
client.setScheduler(scheduler);
|
||||
client.setSocketAddressResolver(new SocketAddressResolver.Sync());
|
||||
if (config!=null)
|
||||
config.accept(client);
|
||||
|
||||
client.start();
|
||||
}
|
||||
|
||||
public HttpClient newHttpClient(Scenario scenario, HttpClientTransport transport)
|
||||
{
|
||||
return new HttpClient(transport, scenario.newSslContextFactory());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void disposeClient() throws Exception
|
||||
{
|
||||
|
|
|
@ -111,6 +111,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
|
|||
{
|
||||
public WorkDir testdir;
|
||||
|
||||
|
||||
@ParameterizedTest
|
||||
@ArgumentsSource(ScenarioProvider.class)
|
||||
public void testStoppingClosesConnections(Scenario scenario) throws Exception
|
||||
|
@ -880,31 +881,33 @@ public class HttpClientTest extends AbstractHttpClientServerTest
|
|||
@ArgumentsSource(ScenarioProvider.class)
|
||||
public void testConnectHostWithMultipleAddresses(Scenario scenario) throws Exception
|
||||
{
|
||||
start(scenario, new EmptyServerHandler());
|
||||
|
||||
client.setSocketAddressResolver(new SocketAddressResolver.Async(client.getExecutor(), client.getScheduler(), client.getConnectTimeout())
|
||||
startServer(scenario, new EmptyServerHandler());
|
||||
startClient(scenario, null, client ->
|
||||
{
|
||||
@Override
|
||||
public void resolve(String host, int port, Promise<List<InetSocketAddress>> promise)
|
||||
client.setSocketAddressResolver(new SocketAddressResolver.Async(client.getExecutor(), client.getScheduler(), 5000)
|
||||
{
|
||||
super.resolve(host, port, new Promise<List<InetSocketAddress>>()
|
||||
@Override
|
||||
public void resolve(String host, int port, Promise<List<InetSocketAddress>> promise)
|
||||
{
|
||||
@Override
|
||||
public void succeeded(List<InetSocketAddress> result)
|
||||
super.resolve(host, port, new Promise<List<InetSocketAddress>>()
|
||||
{
|
||||
// Add as first address an invalid address so that we test
|
||||
// that the connect operation iterates over the addresses.
|
||||
result.add(0, new InetSocketAddress("idontexist", port));
|
||||
promise.succeeded(result);
|
||||
}
|
||||
@Override
|
||||
public void succeeded(List<InetSocketAddress> result)
|
||||
{
|
||||
// Add as first address an invalid address so that we test
|
||||
// that the connect operation iterates over the addresses.
|
||||
result.add(0, new InetSocketAddress("idontexist", port));
|
||||
promise.succeeded(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable x)
|
||||
{
|
||||
promise.failed(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void failed(Throwable x)
|
||||
{
|
||||
promise.failed(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// If no exceptions the test passes.
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.eclipse.jetty.client.http.HttpDestinationOverHTTP;
|
|||
import org.eclipse.jetty.client.util.ByteBufferContentProvider;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.server.Handler;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
|
@ -55,10 +54,11 @@ import org.junit.jupiter.params.provider.ArgumentsSource;
|
|||
public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
|
||||
{
|
||||
@Override
|
||||
public void start(Scenario scenario, Handler handler) throws Exception
|
||||
public HttpClient newHttpClient(Scenario scenario, HttpClientTransport transport)
|
||||
{
|
||||
super.start(scenario, handler);
|
||||
HttpClient client = super.newHttpClient(scenario, transport);
|
||||
client.setStrictEventOrdering(false);
|
||||
return client;
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
|
|
|
@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP;
|
||||
import org.eclipse.jetty.client.util.FutureResponseListener;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpHeaderValue;
|
||||
|
@ -43,13 +42,13 @@ import org.junit.jupiter.params.provider.ArgumentsSource;
|
|||
public class ValidatingConnectionPoolTest extends AbstractHttpClientServerTest
|
||||
{
|
||||
@Override
|
||||
protected void startClient(final Scenario scenario) throws Exception
|
||||
public HttpClient newHttpClient(Scenario scenario, HttpClientTransport transport)
|
||||
{
|
||||
long timeout = 1000;
|
||||
HttpClientTransportOverHTTP transport = new HttpClientTransportOverHTTP(1);
|
||||
transport.setConnectionPoolFactory(destination ->
|
||||
new ValidatingConnectionPool(destination, destination.getHttpClient().getMaxConnectionsPerDestination(), destination, destination.getHttpClient().getScheduler(), timeout));
|
||||
startClient(scenario, transport);
|
||||
|
||||
return super.newHttpClient(scenario, transport);
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-documentation</artifactId>
|
||||
<name>Jetty :: Documentation</name>
|
||||
|
|
|
@ -19,16 +19,17 @@
|
|||
[[startup-jpms]]
|
||||
=== Startup using the Java Platform Module System (JPMS)
|
||||
|
||||
Jetty modules also act ass automatic https://en.wikipedia.org/wiki/Java_Platform_Module_System[JPMS] modules via the `Automatic-Module-Name` attribute in the jar's `MANIFEST.MF` file.
|
||||
Jetty modules also act as automatic https://en.wikipedia.org/wiki/Java_Platform_Module_System[JPMS] modules via the `Automatic-Module-Name` attribute in the jar's `MANIFEST.MF` file.
|
||||
|
||||
This makes possible to run Jetty from the module-path, rather than the class-path.
|
||||
|
||||
We recommend using JDK 11 or greater due to the fact that JDK 11 removed all the "enterprise" modules from the JDK.
|
||||
We recommend using JDK 11 or greater due to the fact that JDK 11 removed all the "enterprise" modules from the JDK,
|
||||
and therefore it guarantees a more stable platform to base your application's dependencies on.
|
||||
The classes in these "enterprise" modules were bundled with JDK 8, and present in "enterprise" modules in JDK 9 and JDK 10.
|
||||
With JDK 11, these "enterprise" classes are either not available in the JDK (because their corresponding module was removed), or they are present in a different module.
|
||||
|
||||
Because some of these "enterprise" classes are required by Jetty or by applications running in Jetty, it is better to use a stable source for those classes - in this case by using JDK 11
|
||||
or greater.
|
||||
or greater, and explicitly referencing the "enterprise" classes as dependencies, rather than assuming they are bundled with the JDK.
|
||||
|
||||
[[jpms-module-path]]
|
||||
==== Starting Jetty on the module-path
|
||||
|
@ -53,7 +54,6 @@ The server then starts Jetty on the module-path using the `--jpms` option.
|
|||
----
|
||||
[NOTE]
|
||||
When running on the module-path using the `--jpms` option, the Jetty start mechanism will fork a second JVM passing it the right JVM options to run on the module-path.
|
||||
|
||||
You will have two JVMs running: one that runs `start.jar` and one that runs Jetty on the module-path.
|
||||
----
|
||||
|
||||
|
@ -64,7 +64,7 @@ If you are interested in the details of how the command line to run Jetty on the
|
|||
$ java -jar $JETTY_HOME/start.jar --jpms --dry-run
|
||||
....
|
||||
|
||||
This will give an out put looking something like this (broken in sections for clarity):
|
||||
This will give an output looking something like this (broken in sections for clarity):
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
....
|
||||
|
@ -156,3 +156,37 @@ add-opens: <module>/<package>=<target-module>(,<target-module>)*
|
|||
add-exports: <module>/<package>=<target-module>(,<target-module>)*
|
||||
add-reads: <module>=<target-module>(,<target-module>)*
|
||||
....
|
||||
|
||||
[[jpms-module-path-alternative]]
|
||||
==== Alternative way to start Jetty on the module-path
|
||||
|
||||
The section above uses the `--jpms` command line option to start Jetty on the module-path.
|
||||
An alternative way of achieving the same result is to use a Jetty module, `$JETTY_BASE/modules/jpms.mod`,
|
||||
that specifies that you want to run using JPMS (and possibly add some JPMS specific configuration).
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
.jpms.mod
|
||||
....
|
||||
[ini]
|
||||
--jpms
|
||||
|
||||
[jpms]
|
||||
# Additional JPMS configuration.
|
||||
....
|
||||
|
||||
The `[ini]` section is equivalent to passing the `--jpms` option to the command line.
|
||||
The `[jpms]` section (see also the link:#jpms-advanced-config[advanced JPMS configuration section])
|
||||
allows you specify additional JPMS configuration.
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
....
|
||||
$ mkdir jetty-base-jpms
|
||||
$ cd jetty-base-jpms
|
||||
$ mkdir modules
|
||||
# Copy the jpms.mod file above into the $JETTY_BASE/modules/ directory.
|
||||
$ cp /tmp/jpms.mod modules/
|
||||
# Add both the http and the jpms modules.
|
||||
$ java -jar $JETTY_HOME/start.jar --add-to-start=http,jpms
|
||||
# Jetty will start on the module-path.
|
||||
$ java -jar $JETTY_HOME/start.jar
|
||||
....
|
||||
|
|
|
@ -754,11 +754,14 @@ New cipher suites are always being developed to stay ahead of attacks.
|
|||
It's only a matter of time before the best of suites is exploited though, and making sure your server is up-to-date in this regard is paramount for any implementation.
|
||||
As an example, to avoid the BEAST attack it is necessary to configure a specific set of cipher suites. This can either be done via link:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setIncludeCipherSuites(java.lang.String...)[SslContext.setIncludeCipherSuites(java.lang.String...)] or vialink:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setExcludeCipherSuites(java.lang.String...)[SslContext.setExcludeCipherSuites(java.lang.String...)].
|
||||
|
||||
____
|
||||
[NOTE]
|
||||
It's crucial that you use the _exact_ names of the cipher suites as used/known by the JDK.
|
||||
You can get them by obtaining an instance of SSLEngine and call `getSupportedCipherSuites()`.
|
||||
Tools like https://www.ssllabs.com/[ssllabs.com] might report slightly different names which will be ignored.
|
||||
|
||||
____
|
||||
[IMPORTANT]
|
||||
It is important to stay up-to-date with the latest supported cipher suites.
|
||||
Be sure to consult Oracle's link:https://java.com/en/jre-jdk-cryptoroadmap.html[JRE and JDK Cryptographic Roadmap] frequently for recent and upcoming changes to supported ciphers.
|
||||
____
|
||||
|
||||
____
|
||||
|
@ -769,7 +772,6 @@ Just overwrite the two present JAR files in `<JRE_HOME>/lib/security/`.
|
|||
____
|
||||
|
||||
Both `setIncludeCipherSuites` and `setExcludeCipherSuites` can be fed by the exact cipher suite name used in the JDK or by using regular expressions.
|
||||
|
||||
If you have a need to adjust the Includes or Excludes, then this is best done with a custom XML that configures the `SslContextFactory` to suit your needs.
|
||||
|
||||
____
|
||||
|
@ -979,7 +981,7 @@ Specifically, you will want to look for the `SslConnectionFactory` portion of th
|
|||
...
|
||||
----
|
||||
|
||||
In the example above you can see both the enabled/disabled protocols and included/excluded ciper suites.
|
||||
In the example above you can see both the enabled/disabled protocols and included/excluded cipher suites.
|
||||
For disabled or excluded protocols and ciphers, the reason they are disabled is given - either due to JVM restrictions, configuration or both.
|
||||
As a reminder, when configuring your includes/excludes, *excludes always win*.
|
||||
|
||||
|
|
|
@ -55,11 +55,8 @@ You *must also install the Apache Aries SPI Fly bundles* as many parts of Jetty
|
|||
[cols=",,",options="header",]
|
||||
|=======================================================================
|
||||
|Jar |Bundle Symbolic Name |Location
|
||||
|org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle-1.0.1.jar |org.apache.aries.spifly.dynamic.bundle
|
||||
|org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle-1.1.jar |org.apache.aries.spifly.dynamic.bundle
|
||||
|https://repo1.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.bundle/[Maven central]
|
||||
|org.apache.aries:org.apache.aries.util-1.0.1.jar |org.apache.aries.util
|
||||
|https://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/[Maven
|
||||
central]
|
||||
|=======================================================================
|
||||
|
||||
____
|
||||
|
@ -835,13 +832,13 @@ In order to use them with Jetty in OSGi, you will need to deploy some extra jars
|
|||
|=======================================================================
|
||||
|Jar |Bundle Symbolic Name |Location
|
||||
|The link:#spifly[spifly jars] | |
|
||||
|org.ow2.asm:asm-5.0.1.jar |org.objectweb.asm
|
||||
|org.ow2.asm:asm-7.0.jar |org.objectweb.asm
|
||||
|https://repo1.maven.org/maven2/org/ow2/asm/asm[Maven central]
|
||||
|
||||
|org.ow2.asm:asm-commons-5.0.1.jar |org.objectweb.asm.commons
|
||||
|org.ow2.asm:asm-commons-7.0.jar |org.objectweb.asm.commons
|
||||
|https://repo1.maven.org/maven2/org/ow2/asm/asm-commons[Maven central]
|
||||
|
||||
|org.ow2.asm:asm-tree-5.0.1.jar |org.objectweb.asm.tree
|
||||
|org.ow2.asm:asm-tree-7.0.jar |org.objectweb.asm.tree
|
||||
|https://repo1.maven.org/maven2/org/ow2/asm/asm-tree[Maven central]
|
||||
|
||||
|javax.annotation:javax.annotation-api-1.2.jar |javax.annotation-api
|
||||
|
@ -1099,32 +1096,31 @@ You should see output similar to this on the console, using the `felix:lb` comma
|
|||
....
|
||||
ID|State |Level|Name
|
||||
0|Active | 0|System Bundle (4.4.1)
|
||||
1|Active | 1|ASM (5.0.1)
|
||||
2|Active | 1|ASM commons classes (5.0.1)
|
||||
3|Active | 1|ASM Tree class visitor (5.0.1)
|
||||
1|Active | 1|ASM (7.0)
|
||||
2|Active | 1|ASM commons classes (7.0)
|
||||
3|Active | 1|ASM Tree class visitor (7.0)
|
||||
4|Active | 1|geronimo-jta_1.1_spec (1.1.1)
|
||||
5|Active | 1|javax.annotation API (1.2.0)
|
||||
6|Active | 1|javax.mail bundle from Glassfish (1.4.1.v201005082020)
|
||||
7|Active | 1|Java Server Pages Standard Tag Library API Bundle (1.2.0.v201105211821)
|
||||
8|Active | 1|JavaServer Pages (TM) TagLib Implementation (1.2.2)
|
||||
9|Active | 1|Jetty :: Servlet Annotations (9.2.4.SNAPSHOT)
|
||||
10|Active | 1|Jetty :: Deployers (9.2.4.SNAPSHOT)
|
||||
11|Active | 1|Jetty :: Http Utility (9.2.4.SNAPSHOT)
|
||||
12|Active | 1|Jetty :: IO Utility (9.2.4.SNAPSHOT)
|
||||
13|Active | 1|Jetty :: JNDI Naming (9.2.4.SNAPSHOT)
|
||||
14|Active | 1|Jetty :: OSGi :: Boot (9.2.4.SNAPSHOT)
|
||||
15|Resolved | 1|Jetty-OSGi-Jasper Integration (9.2.4.SNAPSHOT)
|
||||
16|Active | 1|Jetty Servlet API and Schemas for OSGi (3.1.0.SNAPSHOT)
|
||||
17|Active | 1|Jetty :: Plus (9.2.4.SNAPSHOT)
|
||||
18|Active | 1|Jetty :: Security (9.2.4.SNAPSHOT)
|
||||
19|Active | 1|Jetty :: Server Core (9.2.4.SNAPSHOT)
|
||||
20|Active | 1|Jetty :: Servlet Handling (9.2.4.SNAPSHOT)
|
||||
21|Active | 1|Jetty :: Utility Servlets and Filters (9.2.4.SNAPSHOT)
|
||||
22|Active | 1|Jetty :: Utilities (9.2.4.SNAPSHOT)
|
||||
23|Active | 1|Jetty :: Webapp Application Support (9.2.4.SNAPSHOT)
|
||||
24|Active | 1|Jetty :: XML utilities (9.2.4.SNAPSHOT)
|
||||
25|Active | 1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.1)
|
||||
26|Active | 1|Apache Aries Util (1.0.0)
|
||||
9|Active | 1|Jetty :: Servlet Annotations (9.4.14)
|
||||
10|Active | 1|Jetty :: Deployers (9.4.14)
|
||||
11|Active | 1|Jetty :: Http Utility (9.4.14)
|
||||
12|Active | 1|Jetty :: IO Utility (9.4.14)
|
||||
13|Active | 1|Jetty :: JNDI Naming (9.4.14)
|
||||
14|Active | 1|Jetty :: OSGi :: Boot (9.4.14)
|
||||
15|Resolved | 1|Jetty-OSGi-Jasper Integration (9.4.14)
|
||||
16|Active | 1|Jetty Servlet API and Schemas for OSGi (3.1.0)
|
||||
17|Active | 1|Jetty :: Plus (9.4.14)
|
||||
18|Active | 1|Jetty :: Security (9.4.14)
|
||||
19|Active | 1|Jetty :: Server Core (9.4.14)
|
||||
20|Active | 1|Jetty :: Servlet Handling (9.4.14)
|
||||
21|Active | 1|Jetty :: Utility Servlets and Filters (9.4.14)
|
||||
22|Active | 1|Jetty :: Utilities (9.4.14)
|
||||
23|Active | 1|Jetty :: Webapp Application Support (9.4.14)
|
||||
24|Active | 1|Jetty :: XML utilities (9.4.14)
|
||||
25|Active | 1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.1)
|
||||
27|Active | 1|Apache Felix Bundle Repository (2.0.2)
|
||||
28|Active | 1|Apache Felix Configuration Admin Service (1.8.0)
|
||||
29|Active | 1|Apache Felix EventAdmin (1.3.2)
|
||||
|
@ -1132,10 +1128,10 @@ You should see output similar to this on the console, using the `felix:lb` comma
|
|||
31|Active | 1|Apache Felix Gogo Runtime (0.12.1)
|
||||
32|Active | 1|Apache Felix Gogo Shell (0.10.0)
|
||||
33|Active | 1|Apache Felix Log Service (1.0.1)
|
||||
34|Active | 1|Jetty :: Apache JSP (9.2.4.SNAPSHOT)
|
||||
34|Active | 1|Jetty :: Apache JSP (9.4.14)
|
||||
35|Active | 1|Eclipse Compiler for Java(TM) (3.8.2.v20130121-145325)
|
||||
36|Active | 1|Mortbay EL API and Implementation (8.0.9)
|
||||
37|Active | 1|Mortbay Jasper (8.0.9)
|
||||
36|Active | 1|Mortbay EL API and Implementation (8.5.33.1)
|
||||
37|Active | 1|Mortbay Jasper (8.5.33.1)
|
||||
....
|
||||
|
||||
===== Eclipse
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>gcloud-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-home</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
|
|
|
@ -767,7 +767,7 @@ public class HttpParser
|
|||
|
||||
case LF:
|
||||
setState(State.HEADER);
|
||||
handle=_responseHandler.startResponse(_version, _responseStatus, null)||handle;
|
||||
handle |= _responseHandler.startResponse(_version, _responseStatus, null);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -789,7 +789,7 @@ public class HttpParser
|
|||
handle=_requestHandler.startRequest(_methodString,_uri.toString(), HttpVersion.HTTP_0_9);
|
||||
setState(State.END);
|
||||
BufferUtil.clear(buffer);
|
||||
handle= handleHeaderContentMessage() || handle;
|
||||
handle |= handleHeaderContentMessage();
|
||||
break;
|
||||
|
||||
case ALPHA:
|
||||
|
@ -865,7 +865,7 @@ public class HttpParser
|
|||
if (_responseHandler!=null)
|
||||
{
|
||||
setState(State.HEADER);
|
||||
handle=_responseHandler.startResponse(_version, _responseStatus, null)||handle;
|
||||
handle |= _responseHandler.startResponse(_version, _responseStatus, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -876,7 +876,7 @@ public class HttpParser
|
|||
handle=_requestHandler.startRequest(_methodString,_uri.toString(), HttpVersion.HTTP_0_9);
|
||||
setState(State.END);
|
||||
BufferUtil.clear(buffer);
|
||||
handle= handleHeaderContentMessage() || handle;
|
||||
handle |= handleHeaderContentMessage();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -905,7 +905,7 @@ public class HttpParser
|
|||
|
||||
setState(State.HEADER);
|
||||
|
||||
handle=_requestHandler.startRequest(_methodString,_uri.toString(), _version)||handle;
|
||||
handle |= _requestHandler.startRequest(_methodString,_uri.toString(), _version);
|
||||
continue;
|
||||
|
||||
case ALPHA:
|
||||
|
@ -927,7 +927,7 @@ public class HttpParser
|
|||
case LF:
|
||||
String reason=takeString();
|
||||
setState(State.HEADER);
|
||||
handle=_responseHandler.startResponse(_version, _responseStatus, reason)||handle;
|
||||
handle |= _responseHandler.startResponse(_version, _responseStatus, reason);
|
||||
continue;
|
||||
|
||||
case ALPHA:
|
||||
|
@ -1808,7 +1808,6 @@ public class HttpParser
|
|||
|
||||
/* ------------------------------------------------------------------------------- */
|
||||
public boolean isAtEOF()
|
||||
|
||||
{
|
||||
return _eof;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import java.nio.charset.Charset;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -110,13 +109,28 @@ public class HttpTester
|
|||
|
||||
public static Response parseResponse(InputStream responseStream) throws IOException
|
||||
{
|
||||
ByteArrayOutputStream contentStream = new ByteArrayOutputStream();
|
||||
IO.copy(responseStream, contentStream);
|
||||
|
||||
Response r=new Response();
|
||||
HttpParser parser =new HttpParser(r);
|
||||
parser.parseNext(ByteBuffer.wrap(contentStream.toByteArray()));
|
||||
return r;
|
||||
|
||||
// Read and parse a character at a time so we never can read more than we should.
|
||||
byte[] array = new byte[1];
|
||||
ByteBuffer buffer = ByteBuffer.wrap(array);
|
||||
buffer.limit(1);
|
||||
|
||||
while(true)
|
||||
{
|
||||
buffer.position(1);
|
||||
int l = responseStream.read(array);
|
||||
if (l<0)
|
||||
parser.atEOF();
|
||||
else
|
||||
buffer.position(0);
|
||||
|
||||
if (parser.parseNext(buffer))
|
||||
return r;
|
||||
else if (l<0)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract static class Input
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.nio.ByteBuffer;
|
|||
import java.util.ArrayDeque;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.eclipse.jetty.http2.frames.DataFrame;
|
||||
|
@ -31,10 +30,10 @@ import org.eclipse.jetty.http2.parser.Parser;
|
|||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.RetainableByteBuffer;
|
||||
import org.eclipse.jetty.io.WriteFlusher;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.Retainable;
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -217,8 +216,8 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
|
||||
private void setInputBuffer(ByteBuffer byteBuffer)
|
||||
{
|
||||
if (networkBuffer == null)
|
||||
networkBuffer = acquireNetworkBuffer();
|
||||
acquireNetworkBuffer();
|
||||
// TODO handle buffer overflow?
|
||||
networkBuffer.put(byteBuffer);
|
||||
}
|
||||
|
||||
|
@ -234,93 +233,104 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
if (isFillInterested() || shutdown || failed)
|
||||
return null;
|
||||
|
||||
if (networkBuffer == null)
|
||||
networkBuffer = acquireNetworkBuffer();
|
||||
|
||||
boolean parse = networkBuffer.hasRemaining();
|
||||
|
||||
while (true)
|
||||
boolean interested = false;
|
||||
acquireNetworkBuffer();
|
||||
try
|
||||
{
|
||||
if (parse)
|
||||
boolean parse = networkBuffer.hasRemaining();
|
||||
|
||||
while (true)
|
||||
{
|
||||
boolean released;
|
||||
networkBuffer.retain();
|
||||
try
|
||||
if (parse)
|
||||
{
|
||||
while (networkBuffer.hasRemaining())
|
||||
{
|
||||
parser.parse(networkBuffer.buffer);
|
||||
parser.parse(networkBuffer.getBuffer());
|
||||
if (failed)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
released = networkBuffer.release();
|
||||
if (failed && released)
|
||||
releaseNetworkBuffer();
|
||||
|
||||
task = pollTask();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Dequeued new task {}", task);
|
||||
if (task != null)
|
||||
return task;
|
||||
|
||||
// If more references than 1 (ie not just us), don't refill into buffer and risk compaction.
|
||||
if (networkBuffer.getReferences() > 1)
|
||||
reacquireNetworkBuffer();
|
||||
}
|
||||
|
||||
task = pollTask();
|
||||
// Here we know that this.networkBuffer is not retained by
|
||||
// application code: either it has been released, or it's a new one.
|
||||
int filled = fill(getEndPoint(), networkBuffer.getBuffer());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Dequeued new task {}", task);
|
||||
if (task != null)
|
||||
LOG.debug("Filled {} bytes in {}", filled, networkBuffer);
|
||||
|
||||
if (filled > 0)
|
||||
{
|
||||
if (released)
|
||||
releaseNetworkBuffer();
|
||||
else
|
||||
networkBuffer = null;
|
||||
return task;
|
||||
bytesIn.addAndGet(filled);
|
||||
parse = true;
|
||||
}
|
||||
else if (filled == 0)
|
||||
{
|
||||
interested = true;
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!released)
|
||||
networkBuffer = acquireNetworkBuffer();
|
||||
shutdown = true;
|
||||
session.onShutdown();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Here we know that this.buffer is not retained:
|
||||
// either it has been released, or it's a new one.
|
||||
|
||||
int filled = fill(getEndPoint(), networkBuffer.buffer);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Filled {} bytes in {}", filled, networkBuffer);
|
||||
|
||||
if (filled > 0)
|
||||
{
|
||||
bytesIn.addAndGet(filled);
|
||||
parse = true;
|
||||
}
|
||||
else if (filled == 0)
|
||||
{
|
||||
releaseNetworkBuffer();
|
||||
}
|
||||
finally
|
||||
{
|
||||
releaseNetworkBuffer();
|
||||
if (interested)
|
||||
getEndPoint().fillInterested(fillableCallback);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
releaseNetworkBuffer();
|
||||
shutdown = true;
|
||||
session.onShutdown();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private NetworkBuffer acquireNetworkBuffer()
|
||||
private void acquireNetworkBuffer()
|
||||
{
|
||||
NetworkBuffer networkBuffer = new NetworkBuffer();
|
||||
if (networkBuffer == null)
|
||||
{
|
||||
networkBuffer = new NetworkBuffer();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Acquired {}", networkBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
private void reacquireNetworkBuffer()
|
||||
{
|
||||
NetworkBuffer currentBuffer = networkBuffer;
|
||||
if (currentBuffer == null)
|
||||
throw new IllegalStateException();
|
||||
|
||||
if (currentBuffer.getBuffer().hasRemaining())
|
||||
throw new IllegalStateException();
|
||||
|
||||
currentBuffer.release();
|
||||
networkBuffer = new NetworkBuffer();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Acquired {}", networkBuffer);
|
||||
return networkBuffer;
|
||||
LOG.debug("Reacquired {}<-{}", currentBuffer, networkBuffer);
|
||||
}
|
||||
|
||||
private void releaseNetworkBuffer()
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Released {}", networkBuffer);
|
||||
networkBuffer.recycle();
|
||||
NetworkBuffer currentBuffer = networkBuffer;
|
||||
if (currentBuffer == null)
|
||||
throw new IllegalStateException();
|
||||
|
||||
if (currentBuffer.hasRemaining() && !shutdown && !failed)
|
||||
throw new IllegalStateException();
|
||||
|
||||
currentBuffer.release();
|
||||
networkBuffer = null;
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Released {}", currentBuffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -375,56 +385,36 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
}
|
||||
}
|
||||
|
||||
private class NetworkBuffer implements Callback, Retainable
|
||||
private class NetworkBuffer extends RetainableByteBuffer implements Callback
|
||||
{
|
||||
private final AtomicInteger refCount = new AtomicInteger();
|
||||
private final ByteBuffer buffer;
|
||||
|
||||
private NetworkBuffer()
|
||||
{
|
||||
buffer = byteBufferPool.acquire(bufferSize, false); // TODO: make directness customizable
|
||||
super(byteBufferPool,bufferSize,false);
|
||||
}
|
||||
|
||||
private void put(ByteBuffer source)
|
||||
{
|
||||
BufferUtil.append(buffer, source);
|
||||
}
|
||||
|
||||
private boolean hasRemaining()
|
||||
{
|
||||
return buffer.hasRemaining();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void retain()
|
||||
{
|
||||
refCount.incrementAndGet();
|
||||
}
|
||||
|
||||
private boolean release()
|
||||
{
|
||||
return refCount.decrementAndGet() == 0;
|
||||
BufferUtil.append(getBuffer(), source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
if (release())
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Released retained {}", this);
|
||||
recycle();
|
||||
}
|
||||
completed(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable failure)
|
||||
{
|
||||
if (release())
|
||||
completed(failure);
|
||||
}
|
||||
|
||||
private void completed(Throwable failure)
|
||||
{
|
||||
if (release() == 0)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Released retained " + this, failure);
|
||||
recycle();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,16 +423,5 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
{
|
||||
return InvocationType.NON_BLOCKING;
|
||||
}
|
||||
|
||||
private void recycle()
|
||||
{
|
||||
byteBufferPool.release(buffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s@%x[%s]", getClass().getSimpleName(), hashCode(), buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1208,7 +1208,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
dumpBeans(out, indent, new DumpableCollection("streams", streams.values()));
|
||||
dumpObjects(out, indent, new DumpableCollection("streams", streams.values()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-infinispan</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.eclipse.jetty.util.BufferUtil;
|
|||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Invocable;
|
||||
import org.eclipse.jetty.util.thread.Locker;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
|
||||
/**
|
||||
|
@ -426,21 +425,11 @@ public abstract class ChannelEndPoint extends AbstractEndPoint implements Manage
|
|||
public String toEndPointString()
|
||||
{
|
||||
// We do a best effort to print the right toString() and that's it.
|
||||
try
|
||||
{
|
||||
boolean valid = _key != null && _key.isValid();
|
||||
int keyInterests = valid ? _key.interestOps() : -1;
|
||||
int keyReadiness = valid ? _key.readyOps() : -1;
|
||||
return String.format("%s{io=%d/%d,kio=%d,kro=%d}",
|
||||
super.toEndPointString(),
|
||||
_currentInterestOps,
|
||||
_desiredInterestOps,
|
||||
keyInterests,
|
||||
keyReadiness);
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
return String.format("%s{io=%s,kio=-2,kro=-2}", super.toString(), _desiredInterestOps);
|
||||
}
|
||||
return String.format("%s{io=%d/%d,kio=%d,kro=%d}",
|
||||
super.toEndPointString(),
|
||||
_currentInterestOps,
|
||||
_desiredInterestOps,
|
||||
ManagedSelector.safeInterestOps(_key),
|
||||
ManagedSelector.safeReadyOps(_key));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.time.ZonedDateTime;
|
|||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
|
@ -273,6 +272,34 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
}
|
||||
}
|
||||
|
||||
static int safeReadyOps(SelectionKey selectionKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
return selectionKey.readyOps();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int safeInterestOps(SelectionKey selectionKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
return selectionKey.interestOps();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
|
@ -297,13 +324,13 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
if (keys==null)
|
||||
keys = Collections.singletonList("No dump keys retrieved");
|
||||
|
||||
dumpBeans(out, indent,
|
||||
dumpObjects(out, indent,
|
||||
new DumpableCollection("updates @ "+updatesAt, updates),
|
||||
new DumpableCollection("keys @ "+keysAt, keys));
|
||||
}
|
||||
else
|
||||
{
|
||||
dumpBeans(out, indent);
|
||||
dumpObjects(out, indent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -475,7 +502,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
{
|
||||
Object attachment = key.attachment();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("selected {} {} {} ",key.readyOps(),key,attachment);
|
||||
LOG.debug("selected {} {} {} ", safeReadyOps(key), key, attachment);
|
||||
try
|
||||
{
|
||||
if (attachment instanceof Selectable)
|
||||
|
@ -491,7 +518,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalStateException("key=" + key + ", att=" + attachment + ", iOps=" + key.interestOps() + ", rOps=" + key.readyOps());
|
||||
throw new IllegalStateException("key=" + key + ", att=" + attachment + ", iOps=" + safeInterestOps(key) + ", rOps=" + safeReadyOps(key));
|
||||
}
|
||||
}
|
||||
catch (CancelledKeyException x)
|
||||
|
@ -572,19 +599,10 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
List<String> list = new ArrayList<>(selector_keys.size());
|
||||
for (SelectionKey key : selector_keys)
|
||||
{
|
||||
if (key==null)
|
||||
continue;
|
||||
try
|
||||
{
|
||||
list.add(String.format("SelectionKey@%x{i=%d}->%s", key.hashCode(), key.interestOps(), key.attachment()));
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
list.add(String.format("SelectionKey@%x[%s]->%s", key.hashCode(), x, key.attachment()));
|
||||
}
|
||||
if (key != null)
|
||||
list.add(String.format("SelectionKey@%x{i=%d}->%s", key.hashCode(), safeInterestOps(key), key.attachment()));
|
||||
}
|
||||
keys = list;
|
||||
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
//
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
//
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
//
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.io;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Retainable;
|
||||
|
||||
/**
|
||||
* A Retainable ByteBuffer.
|
||||
* <p>Acquires a ByteBuffer from a {@link ByteBufferPool} and maintains a reference count that is
|
||||
* initially 1, incremented with {@link #retain()} and decremented with {@link #release()}. The buffer
|
||||
* is released to the pool when the reference count is decremented to 0.</p>
|
||||
*/
|
||||
public class RetainableByteBuffer implements Retainable
|
||||
{
|
||||
private final ByteBufferPool pool;
|
||||
private final ByteBuffer buffer;
|
||||
private final AtomicInteger references;
|
||||
|
||||
public RetainableByteBuffer(ByteBufferPool pool, int size)
|
||||
{
|
||||
this(pool, size, false);
|
||||
}
|
||||
|
||||
public RetainableByteBuffer(ByteBufferPool pool, int size, boolean direct)
|
||||
{
|
||||
this.pool = pool;
|
||||
this.buffer = pool.acquire(size, direct);
|
||||
this.references = new AtomicInteger(1);
|
||||
}
|
||||
|
||||
public ByteBuffer getBuffer()
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public int getReferences()
|
||||
{
|
||||
return references.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void retain()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
int r = references.get();
|
||||
if (r == 0)
|
||||
throw new IllegalStateException("released " + this);
|
||||
if (references.compareAndSet(r, r + 1))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public int release()
|
||||
{
|
||||
int ref = references.decrementAndGet();
|
||||
if (ref == 0)
|
||||
pool.release(buffer);
|
||||
else if (ref < 0)
|
||||
throw new IllegalStateException("already released " + this);
|
||||
return ref;
|
||||
}
|
||||
|
||||
public boolean hasRemaining()
|
||||
{
|
||||
return buffer.hasRemaining();
|
||||
}
|
||||
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return !buffer.hasRemaining();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s@%x{%s,r=%d}", getClass().getSimpleName(), hashCode(), BufferUtil.toDetailString(buffer), getReferences());
|
||||
}
|
||||
}
|
|
@ -80,28 +80,28 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
private static final Logger LOG = Log.getLogger(SslConnection.class);
|
||||
private static final String TLS_1_3 = "TLSv1.3";
|
||||
|
||||
|
||||
private enum Handshake
|
||||
{
|
||||
INITIAL,
|
||||
SUCCEEDED,
|
||||
FAILED
|
||||
}
|
||||
|
||||
private enum FillState
|
||||
|
||||
private enum FillState
|
||||
{
|
||||
IDLE, // Not Filling any data
|
||||
INTERESTED, // We have a pending read interest
|
||||
WAIT_FOR_FLUSH // Waiting for a flush to happen
|
||||
}
|
||||
|
||||
private enum FlushState
|
||||
{
|
||||
|
||||
private enum FlushState
|
||||
{
|
||||
IDLE, // Not flushing any data
|
||||
WRITING, // We have a pending write of encrypted data
|
||||
WAIT_FOR_FILL // Waiting for a fill to happen
|
||||
}
|
||||
|
||||
|
||||
private final List<SslHandshakeListener> handshakeListeners = new ArrayList<>();
|
||||
private final ByteBufferPool _bufferPool;
|
||||
private final SSLEngine _sslEngine;
|
||||
|
@ -119,20 +119,20 @@ public class SslConnection extends AbstractConnection
|
|||
private FillState _fillState = FillState.IDLE;
|
||||
private AtomicReference<Handshake> _handshake = new AtomicReference<>(Handshake.INITIAL);
|
||||
private boolean _underflown;
|
||||
|
||||
private abstract class RunnableTask implements Runnable, Invocable
|
||||
|
||||
private abstract class RunnableTask implements Runnable, Invocable
|
||||
{
|
||||
private final String _operation;
|
||||
|
||||
protected RunnableTask(String op)
|
||||
{
|
||||
_operation=op;
|
||||
_operation = op;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("SSL:%s:%s:%s",SslConnection.this,_operation,getInvocationType());
|
||||
return String.format("SSL:%s:%s:%s", SslConnection.this, _operation, getInvocationType());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ public class SslConnection extends AbstractConnection
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("SSLC.NBReadCB@%x{%s}", SslConnection.this.hashCode(),SslConnection.this);
|
||||
return String.format("SSLC.NBReadCB@%x{%s}", SslConnection.this.hashCode(), SslConnection.this);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -233,7 +233,7 @@ public class SslConnection extends AbstractConnection
|
|||
|
||||
/**
|
||||
* @return The number of renegotions allowed for this connection. When the limit
|
||||
* is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
|
||||
* is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
|
||||
*/
|
||||
public int getRenegotiationLimit()
|
||||
{
|
||||
|
@ -241,9 +241,9 @@ public class SslConnection extends AbstractConnection
|
|||
}
|
||||
|
||||
/**
|
||||
* @param renegotiationLimit The number of renegotions allowed for this connection.
|
||||
* When the limit is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
|
||||
* Default -1.
|
||||
* @param renegotiationLimit The number of renegotions allowed for this connection.
|
||||
* When the limit is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
|
||||
* Default -1.
|
||||
*/
|
||||
public void setRenegotiationLimit(int renegotiationLimit)
|
||||
{
|
||||
|
@ -311,26 +311,26 @@ public class SslConnection extends AbstractConnection
|
|||
@Override
|
||||
public void onFillInterestedFailed(Throwable cause)
|
||||
{
|
||||
_decryptedEndPoint.onFillableFail(cause==null?new IOException():cause);
|
||||
_decryptedEndPoint.onFillableFail(cause == null ? new IOException() : cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toConnectionString()
|
||||
{
|
||||
ByteBuffer b = _encryptedInput;
|
||||
int ei=b==null?-1:b.remaining();
|
||||
int ei = b == null ? -1 : b.remaining();
|
||||
b = _encryptedOutput;
|
||||
int eo=b==null?-1:b.remaining();
|
||||
int eo = b == null ? -1 : b.remaining();
|
||||
b = _decryptedInput;
|
||||
int di=b==null?-1:b.remaining();
|
||||
int di = b == null ? -1 : b.remaining();
|
||||
|
||||
Connection connection = _decryptedEndPoint.getConnection();
|
||||
return String.format("%s@%x{%s,eio=%d/%d,di=%d,fill=%s,flush=%s}~>%s=>%s",
|
||||
getClass().getSimpleName(),
|
||||
hashCode(),
|
||||
_sslEngine.getHandshakeStatus(),
|
||||
ei,eo,di,
|
||||
_fillState,_flushState,
|
||||
ei, eo, di,
|
||||
_fillState, _flushState,
|
||||
_decryptedEndPoint.toEndPointString(),
|
||||
connection instanceof AbstractConnection ? ((AbstractConnection)connection).toConnectionString() : connection);
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ public class SslConnection extends AbstractConnection
|
|||
public class DecryptedEndPoint extends AbstractEndPoint
|
||||
{
|
||||
private final Callback _incompleteWriteCallback = new IncompleteWriteCallback();
|
||||
|
||||
|
||||
public DecryptedEndPoint()
|
||||
{
|
||||
// Disable idle timeout checking: no scheduler and -1 timeout for this instance.
|
||||
|
@ -399,22 +399,22 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
// If we are handshaking, then wake up any waiting write as well as it may have been blocked on the read
|
||||
boolean waiting_for_fill;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onFillable {}", SslConnection.this);
|
||||
|
||||
_fillState = FillState.IDLE;
|
||||
waiting_for_fill = _flushState==FlushState.WAIT_FOR_FILL;
|
||||
waiting_for_fill = _flushState == FlushState.WAIT_FOR_FILL;
|
||||
}
|
||||
|
||||
|
||||
getFillInterest().fillable();
|
||||
|
||||
|
||||
if (waiting_for_fill)
|
||||
{
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
waiting_for_fill = _flushState==FlushState.WAIT_FOR_FILL;
|
||||
waiting_for_fill = _flushState == FlushState.WAIT_FOR_FILL;
|
||||
}
|
||||
if (waiting_for_fill)
|
||||
fill(BufferUtil.EMPTY_BUFFER);
|
||||
|
@ -430,13 +430,13 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
// If we are handshaking, then wake up any waiting write as well as it may have been blocked on the read
|
||||
boolean fail = false;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onFillableFail {}", SslConnection.this, failure);
|
||||
|
||||
|
||||
_fillState = FillState.IDLE;
|
||||
switch(_flushState)
|
||||
switch (_flushState)
|
||||
{
|
||||
case WAIT_FOR_FILL:
|
||||
_flushState = FlushState.IDLE;
|
||||
|
@ -444,12 +444,12 @@ public class SslConnection extends AbstractConnection
|
|||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// wake up whoever is doing the fill
|
||||
getFillInterest().onFail(failure);
|
||||
|
||||
|
||||
// Try to complete the write
|
||||
if (fail)
|
||||
{
|
||||
|
@ -464,7 +464,7 @@ public class SslConnection extends AbstractConnection
|
|||
if (connection instanceof AbstractConnection)
|
||||
{
|
||||
AbstractConnection a = (AbstractConnection)connection;
|
||||
if (a.getInputBufferSize()<_sslEngine.getSession().getApplicationBufferSize())
|
||||
if (a.getInputBufferSize() < _sslEngine.getSession().getApplicationBufferSize())
|
||||
a.setInputBufferSize(_sslEngine.getSession().getApplicationBufferSize());
|
||||
}
|
||||
super.setConnection(connection);
|
||||
|
@ -480,7 +480,7 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
try
|
||||
{
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(">fill {}", SslConnection.this);
|
||||
|
@ -488,20 +488,20 @@ public class SslConnection extends AbstractConnection
|
|||
int filled = -2;
|
||||
try
|
||||
{
|
||||
if (_fillState!=FillState.IDLE)
|
||||
if (_fillState != FillState.IDLE)
|
||||
return filled = 0;
|
||||
|
||||
|
||||
// Do we already have some decrypted data?
|
||||
if (BufferUtil.hasContent(_decryptedInput))
|
||||
return filled = BufferUtil.append(buffer,_decryptedInput);
|
||||
|
||||
return filled = BufferUtil.append(buffer, _decryptedInput);
|
||||
|
||||
// loop filling and unwrapping until we have something
|
||||
while (true)
|
||||
{
|
||||
HandshakeStatus status = _sslEngine.getHandshakeStatus();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("fill {}", status);
|
||||
switch(status)
|
||||
switch (status)
|
||||
{
|
||||
case NEED_UNWRAP:
|
||||
case NOT_HANDSHAKING:
|
||||
|
@ -510,20 +510,25 @@ public class SslConnection extends AbstractConnection
|
|||
case NEED_TASK:
|
||||
_sslEngine.getDelegatedTask().run();
|
||||
continue;
|
||||
|
||||
|
||||
case NEED_WRAP:
|
||||
if (_flushState==FlushState.IDLE && flush(BufferUtil.EMPTY_BUFFER))
|
||||
if (_flushState == FlushState.IDLE && flush(BufferUtil.EMPTY_BUFFER))
|
||||
{
|
||||
if (_sslEngine.isInboundDone())
|
||||
// TODO this is probably a JVM bug, work around it by -1
|
||||
return -1;
|
||||
continue;
|
||||
}
|
||||
// handle in needsFillInterest
|
||||
return filled = 0;
|
||||
|
||||
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected HandshakeStatus " + status);
|
||||
}
|
||||
|
||||
if (_encryptedInput==null)
|
||||
|
||||
if (_encryptedInput == null)
|
||||
_encryptedInput = _bufferPool.acquire(_sslEngine.getSession().getPacketBufferSize(), _encryptedDirectBuffers);
|
||||
|
||||
|
||||
// can we use the passed buffer if it is big enough
|
||||
ByteBuffer app_in;
|
||||
if (_decryptedInput == null)
|
||||
|
@ -538,7 +543,7 @@ public class SslConnection extends AbstractConnection
|
|||
app_in = _decryptedInput;
|
||||
BufferUtil.compact(_encryptedInput);
|
||||
}
|
||||
|
||||
|
||||
// Let's try reading some encrypted data... even if we have some already.
|
||||
int net_filled = getEndPoint().fill(_encryptedInput);
|
||||
|
||||
|
@ -561,26 +566,26 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
BufferUtil.flipToFlush(app_in, pos);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("unwrap {} {} unwrapBuffer={} appBuffer={}",
|
||||
net_filled,
|
||||
unwrapResult.toString().replace('\n',' '),
|
||||
BufferUtil.toDetailString(app_in),
|
||||
BufferUtil.toDetailString(buffer));
|
||||
LOG.debug("unwrap net_filled={} {} encryptedBuffer={} unwrapBuffer={} appBuffer={}",
|
||||
net_filled,
|
||||
unwrapResult.toString().replace('\n', ' '),
|
||||
BufferUtil.toSummaryString(_encryptedInput),
|
||||
BufferUtil.toDetailString(app_in),
|
||||
BufferUtil.toDetailString(buffer));
|
||||
|
||||
SSLEngineResult.Status unwrap = unwrapResult.getStatus();
|
||||
|
||||
// Extra check on unwrapResultStatus == OK with zero bytes consumed
|
||||
// or produced is due to an SSL client on Android (see bug #454773).
|
||||
if (unwrap==Status.OK && unwrapResult.bytesConsumed() == 0 && unwrapResult.bytesProduced() == 0)
|
||||
if (unwrap == Status.OK && unwrapResult.bytesConsumed() == 0 && unwrapResult.bytesProduced() == 0)
|
||||
unwrap = Status.BUFFER_UNDERFLOW;
|
||||
|
||||
|
||||
switch (unwrap)
|
||||
{
|
||||
case CLOSED:
|
||||
return filled = -1;
|
||||
|
||||
|
||||
case BUFFER_UNDERFLOW:
|
||||
if (net_filled > 0)
|
||||
continue; // try filling some more
|
||||
|
@ -596,7 +601,7 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
if (unwrapResult.getHandshakeStatus() == HandshakeStatus.FINISHED)
|
||||
handshakeSucceeded();
|
||||
|
||||
|
||||
if (isRenegotiating() && !allowRenegotiate())
|
||||
return filled = -1;
|
||||
|
||||
|
@ -605,14 +610,14 @@ public class SslConnection extends AbstractConnection
|
|||
// another call to fill() or flush().
|
||||
if (unwrapResult.bytesProduced() > 0)
|
||||
{
|
||||
if (app_in==buffer)
|
||||
if (app_in == buffer)
|
||||
return filled = unwrapResult.bytesProduced();
|
||||
return filled = BufferUtil.append(buffer,_decryptedInput);
|
||||
return filled = BufferUtil.append(buffer, _decryptedInput);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected unwrap result " + unwrap);
|
||||
}
|
||||
|
@ -622,10 +627,10 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
handshakeFailed(x);
|
||||
|
||||
if (_flushState==FlushState.WAIT_FOR_FILL)
|
||||
if (_flushState == FlushState.WAIT_FOR_FILL)
|
||||
{
|
||||
_flushState=FlushState.IDLE;
|
||||
getExecutor().execute(()->_decryptedEndPoint.getWriteFlusher().onFail(x));
|
||||
_flushState = FlushState.IDLE;
|
||||
getExecutor().execute(() -> _decryptedEndPoint.getWriteFlusher().onFail(x));
|
||||
}
|
||||
|
||||
throw x;
|
||||
|
@ -637,19 +642,19 @@ public class SslConnection extends AbstractConnection
|
|||
_bufferPool.release(_encryptedInput);
|
||||
_encryptedInput = null;
|
||||
}
|
||||
|
||||
|
||||
if (_decryptedInput != null && !_decryptedInput.hasRemaining())
|
||||
{
|
||||
_bufferPool.release(_decryptedInput);
|
||||
_decryptedInput = null;
|
||||
}
|
||||
|
||||
if (_flushState==FlushState.WAIT_FOR_FILL)
|
||||
if (_flushState == FlushState.WAIT_FOR_FILL)
|
||||
{
|
||||
_flushState=FlushState.IDLE;
|
||||
getExecutor().execute(()->_decryptedEndPoint.getWriteFlusher().completeWrite());
|
||||
_flushState = FlushState.IDLE;
|
||||
getExecutor().execute(() -> _decryptedEndPoint.getWriteFlusher().completeWrite());
|
||||
}
|
||||
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("<fill f={} uf={} {}", filled, _underflown, SslConnection.this);
|
||||
}
|
||||
|
@ -672,15 +677,15 @@ public class SslConnection extends AbstractConnection
|
|||
boolean fillable;
|
||||
ByteBuffer write = null;
|
||||
boolean interest = false;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
LOG.debug(">needFillInterest uf={} {}", _underflown, SslConnection.this);
|
||||
LOG.debug("ei={} di={}",BufferUtil.toDetailString(_encryptedInput),BufferUtil.toDetailString(_decryptedInput));
|
||||
LOG.debug("ei={} di={}", BufferUtil.toDetailString(_encryptedInput), BufferUtil.toDetailString(_decryptedInput));
|
||||
}
|
||||
|
||||
if (_fillState!=FillState.IDLE)
|
||||
if (_fillState != FillState.IDLE)
|
||||
return;
|
||||
|
||||
// Fillable if we have decrypted Input OR encrypted input that has not yet been underflown.
|
||||
|
@ -720,10 +725,10 @@ public class SslConnection extends AbstractConnection
|
|||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("<needFillInterest s={}/{} f={} i={} w={}",_flushState,_fillState,fillable,interest,BufferUtil.toDetailString(write));
|
||||
LOG.debug("<needFillInterest s={}/{} f={} i={} w={}", _flushState, _fillState, fillable, interest, BufferUtil.toDetailString(write));
|
||||
}
|
||||
|
||||
if (write!=null)
|
||||
if (write != null)
|
||||
getEndPoint().write(_incompleteWriteCallback, write);
|
||||
else if (fillable)
|
||||
getExecutor().execute(_runFillable);
|
||||
|
@ -744,14 +749,14 @@ public class SslConnection extends AbstractConnection
|
|||
if (_handshake.compareAndSet(Handshake.INITIAL, Handshake.SUCCEEDED))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("handshake succeeded {} {} {}/{}",SslConnection.this,
|
||||
_sslEngine.getUseClientMode() ? "client" : "resumed server",
|
||||
_sslEngine.getSession().getProtocol(),_sslEngine.getSession().getCipherSuite());
|
||||
LOG.debug("handshake succeeded {} {} {}/{}", SslConnection.this,
|
||||
_sslEngine.getUseClientMode() ? "client" : "resumed server",
|
||||
_sslEngine.getSession().getProtocol(), _sslEngine.getSession().getCipherSuite());
|
||||
notifyHandshakeSucceeded(_sslEngine);
|
||||
}
|
||||
else if (_handshake.get() == Handshake.SUCCEEDED)
|
||||
{
|
||||
if (_renegotiationLimit>0)
|
||||
if (_renegotiationLimit > 0)
|
||||
_renegotiationLimit--;
|
||||
}
|
||||
}
|
||||
|
@ -799,18 +804,18 @@ public class SslConnection extends AbstractConnection
|
|||
LOG.ignore(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean flush(ByteBuffer... appOuts) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
LOG.debug(">flush {}", SslConnection.this);
|
||||
int i=0;
|
||||
int i = 0;
|
||||
for (ByteBuffer b : appOuts)
|
||||
LOG.debug("flush b[{}]={}", i++, BufferUtil.toDetailString(b));
|
||||
}
|
||||
|
@ -818,7 +823,7 @@ public class SslConnection extends AbstractConnection
|
|||
Boolean result = null;
|
||||
try
|
||||
{
|
||||
if (_flushState!=FlushState.IDLE)
|
||||
if (_flushState != FlushState.IDLE)
|
||||
return result = false;
|
||||
|
||||
// Keep going while we can make progress or until we are done
|
||||
|
@ -826,8 +831,8 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
HandshakeStatus status = _sslEngine.getHandshakeStatus();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("flush {}",status);
|
||||
switch(status)
|
||||
LOG.debug("flush {}", status);
|
||||
switch (status)
|
||||
{
|
||||
case NEED_WRAP:
|
||||
case NOT_HANDSHAKING:
|
||||
|
@ -836,18 +841,18 @@ public class SslConnection extends AbstractConnection
|
|||
case NEED_TASK:
|
||||
_sslEngine.getDelegatedTask().run();
|
||||
continue;
|
||||
|
||||
|
||||
case NEED_UNWRAP:
|
||||
if (_fillState==FillState.IDLE)
|
||||
if (_fillState == FillState.IDLE)
|
||||
{
|
||||
int filled = fill(BufferUtil.EMPTY_BUFFER);
|
||||
if (_sslEngine.getHandshakeStatus()!=status)
|
||||
if (_sslEngine.getHandshakeStatus() != status)
|
||||
continue;
|
||||
if (filled < 0)
|
||||
throw new IOException("Broken pipe");
|
||||
}
|
||||
return result = false;
|
||||
|
||||
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected HandshakeStatus " + status);
|
||||
}
|
||||
|
@ -862,19 +867,23 @@ public class SslConnection extends AbstractConnection
|
|||
try
|
||||
{
|
||||
wrapResult = _sslEngine.wrap(appOuts, _encryptedOutput);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("wrap {} {}", wrapResult.toString().replace('\n',' '), BufferUtil.toHexSummary(_encryptedOutput));
|
||||
}
|
||||
finally
|
||||
{
|
||||
BufferUtil.flipToFlush(_encryptedOutput, pos);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("wrap {} {} ioDone={}/{}",
|
||||
wrapResult.toString().replace('\n', ' '),
|
||||
BufferUtil.toSummaryString(_encryptedOutput),
|
||||
_sslEngine.isInboundDone(),
|
||||
_sslEngine.isOutboundDone());
|
||||
|
||||
// Was all the data consumed?
|
||||
boolean allConsumed=true;
|
||||
boolean allConsumed = true;
|
||||
for (ByteBuffer b : appOuts)
|
||||
if (BufferUtil.hasContent(b))
|
||||
allConsumed=false;
|
||||
allConsumed = false;
|
||||
|
||||
// if we have net bytes, let's try to flush them
|
||||
boolean flushed = true;
|
||||
|
@ -899,12 +908,12 @@ public class SslConnection extends AbstractConnection
|
|||
return result = true;
|
||||
throw new IOException("Broken pipe");
|
||||
}
|
||||
|
||||
|
||||
case BUFFER_OVERFLOW:
|
||||
if (!flushed)
|
||||
return result = false;
|
||||
continue;
|
||||
|
||||
|
||||
case OK:
|
||||
if (wrapResult.getHandshakeStatus() == HandshakeStatus.FINISHED)
|
||||
handshakeSucceeded();
|
||||
|
@ -960,24 +969,24 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
boolean fillInterest = false;
|
||||
ByteBuffer write = null;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(">onIncompleteFlush {} {}", SslConnection.this, BufferUtil.toDetailString(_encryptedOutput));
|
||||
|
||||
if (_flushState!=FlushState.IDLE)
|
||||
if (_flushState != FlushState.IDLE)
|
||||
return;
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
HandshakeStatus status = _sslEngine.getHandshakeStatus();
|
||||
switch(status)
|
||||
switch (status)
|
||||
{
|
||||
case NEED_TASK:
|
||||
case NEED_WRAP:
|
||||
case NOT_HANDSHAKING:
|
||||
// write what we have or an empty buffer to reschedule a call to flush
|
||||
write = BufferUtil.hasContent(_encryptedOutput)?_encryptedOutput:BufferUtil.EMPTY_BUFFER;
|
||||
write = BufferUtil.hasContent(_encryptedOutput) ? _encryptedOutput : BufferUtil.EMPTY_BUFFER;
|
||||
_flushState = FlushState.WRITING;
|
||||
break;
|
||||
|
||||
|
@ -990,7 +999,7 @@ public class SslConnection extends AbstractConnection
|
|||
break;
|
||||
}
|
||||
|
||||
if (_fillState!=FillState.IDLE)
|
||||
if (_fillState != FillState.IDLE)
|
||||
{
|
||||
// Wait for a fill that is happening anyway
|
||||
_flushState = FlushState.WAIT_FOR_FILL;
|
||||
|
@ -1002,12 +1011,12 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
int filled = fill(BufferUtil.EMPTY_BUFFER);
|
||||
// If this changed the status, let's try again
|
||||
if (_sslEngine.getHandshakeStatus()!=status)
|
||||
if (_sslEngine.getHandshakeStatus() != status)
|
||||
continue;
|
||||
if (filled < 0)
|
||||
throw new IOException("Broken pipe");
|
||||
}
|
||||
catch(IOException e)
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
close(e);
|
||||
|
@ -1032,7 +1041,7 @@ public class SslConnection extends AbstractConnection
|
|||
LOG.debug("<onIncompleteFlush s={}/{} fi={} w={}", _flushState, _fillState, fillInterest, BufferUtil.toDetailString(write));
|
||||
}
|
||||
|
||||
if (write!=null)
|
||||
if (write != null)
|
||||
getEndPoint().write(_incompleteWriteCallback, write);
|
||||
else if (fillInterest)
|
||||
ensureFillInterested();
|
||||
|
@ -1053,7 +1062,7 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
boolean close;
|
||||
boolean flush = false;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
boolean ishut = getEndPoint().isInputShutdown();
|
||||
boolean oshut = getEndPoint().isOutputShutdown();
|
||||
|
@ -1101,7 +1110,7 @@ public class SslConnection extends AbstractConnection
|
|||
private void ensureFillInterested()
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ensureFillInterested {}",SslConnection.this);
|
||||
LOG.debug("ensureFillInterested {}", SslConnection.this);
|
||||
SslConnection.this.tryFillInterested(_sslReadCallback);
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1151,7 @@ public class SslConnection extends AbstractConnection
|
|||
@Override
|
||||
public boolean isInputShutdown()
|
||||
{
|
||||
return getEndPoint().isInputShutdown() || isInboundDone();
|
||||
return BufferUtil.isEmpty(_decryptedInput) && (getEndPoint().isInputShutdown() || isInboundDone());
|
||||
}
|
||||
|
||||
private boolean isInboundDone()
|
||||
|
@ -1215,7 +1224,7 @@ public class SslConnection extends AbstractConnection
|
|||
return false;
|
||||
}
|
||||
|
||||
if (getRenegotiationLimit()==0)
|
||||
if (getRenegotiationLimit() == 0)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Renegotiation limit exceeded {}", SslConnection.this);
|
||||
|
@ -1242,16 +1251,16 @@ public class SslConnection extends AbstractConnection
|
|||
{
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
{
|
||||
boolean fillable;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("IncompleteWriteCB succeeded {}", SslConnection.this);
|
||||
|
||||
|
||||
releaseEncryptedOutputBuffer();
|
||||
_flushState = FlushState.IDLE;
|
||||
fillable = _fillState==FillState.WAIT_FOR_FLUSH;
|
||||
fillable = _fillState == FillState.WAIT_FOR_FLUSH;
|
||||
if (fillable)
|
||||
_fillState = FillState.IDLE;
|
||||
}
|
||||
|
@ -1261,43 +1270,43 @@ public class SslConnection extends AbstractConnection
|
|||
|
||||
_decryptedEndPoint.getWriteFlusher().completeWrite();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void failed(final Throwable x)
|
||||
{
|
||||
boolean fail_fill_interest;
|
||||
synchronized(_decryptedEndPoint)
|
||||
synchronized (_decryptedEndPoint)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("IncompleteWriteCB failed {}", SslConnection.this, x);
|
||||
|
||||
|
||||
BufferUtil.clear(_encryptedOutput);
|
||||
releaseEncryptedOutputBuffer();
|
||||
|
||||
|
||||
_flushState = FlushState.IDLE;
|
||||
fail_fill_interest = _fillState==FillState.WAIT_FOR_FLUSH;
|
||||
fail_fill_interest = _fillState == FillState.WAIT_FOR_FLUSH;
|
||||
if (fail_fill_interest)
|
||||
_fillState = FillState.IDLE;
|
||||
}
|
||||
|
||||
getExecutor().execute(()->
|
||||
|
||||
getExecutor().execute(() ->
|
||||
{
|
||||
if (fail_fill_interest)
|
||||
_decryptedEndPoint.getFillInterest().onFail(x);
|
||||
_decryptedEndPoint.getWriteFlusher().onFail(x);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InvocationType getInvocationType()
|
||||
{
|
||||
return _decryptedEndPoint.getWriteFlusher().getCallbackInvocationType();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("SSL@%h.DEP.writeCallback",SslConnection.this);
|
||||
return String.format("SSL@%h.DEP.writeCallback", SslConnection.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jmh</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
|
|
|
@ -217,12 +217,15 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable, De
|
|||
|
||||
private static Constructor<?> findConstructor(Class<?> klass)
|
||||
{
|
||||
String pName = klass.getPackage().getName();
|
||||
String cName = klass.getName().substring(pName.length() + 1);
|
||||
Package pkg = klass.getPackage();
|
||||
if (pkg == null)
|
||||
return null;
|
||||
String pName = pkg.getName();
|
||||
String cName = klass.getName().substring(pName.isEmpty() ? 0 : pName.length() + 1);
|
||||
String mName = pName + ".jmx." + cName + "MBean";
|
||||
try
|
||||
{
|
||||
Class<?> mbeanClass = Loader.loadClass(mName);
|
||||
Class<?> mbeanClass = Loader.loadClass(klass, mName);
|
||||
Constructor<?> constructor = ModelMBean.class.isAssignableFrom(mbeanClass)
|
||||
? mbeanClass.getConstructor()
|
||||
: mbeanClass.getConstructor(Object.class);
|
||||
|
@ -310,12 +313,19 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable, De
|
|||
// No override of the mbean's ObjectName, so make a generic one.
|
||||
if (objectName == null)
|
||||
{
|
||||
Class<?> klass = obj.getClass();
|
||||
while (klass.isArray())
|
||||
klass = klass.getComponentType();
|
||||
|
||||
// If no explicit domain, create one.
|
||||
String domain = _domain;
|
||||
if (domain == null)
|
||||
domain = obj.getClass().getPackage().getName();
|
||||
{
|
||||
Package pkg = klass.getPackage();
|
||||
domain = pkg == null ? "" : pkg.getName();
|
||||
}
|
||||
|
||||
String type = obj.getClass().getName().toLowerCase(Locale.ENGLISH);
|
||||
String type = klass.getName().toLowerCase(Locale.ENGLISH);
|
||||
int dot = type.lastIndexOf('.');
|
||||
if (dot >= 0)
|
||||
type = type.substring(dot + 1);
|
||||
|
|
|
@ -24,6 +24,7 @@ import javax.management.Attribute;
|
|||
import javax.management.MBeanInfo;
|
||||
import javax.management.MBeanOperationInfo;
|
||||
import javax.management.MBeanParameterInfo;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import com.acme.Derived;
|
||||
import com.acme.Managed;
|
||||
|
@ -34,6 +35,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
@ -54,6 +56,46 @@ public class ObjectMBeanTest
|
|||
container = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMBeanForNull()
|
||||
{
|
||||
Object mBean = container.mbeanFor(null);
|
||||
assertNull(mBean);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMBeanForString()
|
||||
{
|
||||
String obj = "foo";
|
||||
Object mbean = container.mbeanFor(obj);
|
||||
assertNotNull(mbean);
|
||||
container.beanAdded(null, obj);
|
||||
ObjectName objectName = container.findMBean(obj);
|
||||
assertNotNull(objectName);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMBeanForStringArray()
|
||||
{
|
||||
String[] obj = {"a", "b"};
|
||||
Object mbean = container.mbeanFor(obj);
|
||||
assertNotNull(mbean);
|
||||
container.beanAdded(null, obj);
|
||||
ObjectName objectName = container.findMBean(obj);
|
||||
assertNotNull(objectName);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMBeanForIntArray()
|
||||
{
|
||||
int[] obj = {0, 1, 2};
|
||||
Object mbean = container.mbeanFor(obj);
|
||||
assertNotNull(mbean);
|
||||
container.beanAdded(null, obj);
|
||||
ObjectName objectName = container.findMBean(obj);
|
||||
assertNotNull(objectName);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMetaDataCaching()
|
||||
{
|
||||
|
|
|
@ -70,13 +70,6 @@ public class ObjectMBeanUtilTest
|
|||
assertEquals("Test the mbean extended stuff", objectMBeanInfo.getDescription(), "Mbean description must be equal to : Test the mbean extended stuff");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMbeanForNullCheck()
|
||||
{
|
||||
Object mBean = container.mbeanFor(null);
|
||||
assertNull(mBean, "As we are passing null value the output should be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAttributeMBeanException() throws Exception
|
||||
{
|
||||
|
@ -151,7 +144,7 @@ public class ObjectMBeanUtilTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetAttributesForCollectionTypeAttribue() throws Exception
|
||||
public void testSetAttributesForCollectionTypeAttribute() throws Exception
|
||||
{
|
||||
ArrayList<Derived> aliasNames = new ArrayList<>(Arrays.asList(getArrayTypeAttribute()));
|
||||
|
||||
|
@ -231,7 +224,7 @@ public class ObjectMBeanUtilTest
|
|||
ReflectionException e = assertThrows(ReflectionException.class, () ->
|
||||
objectMBean.invoke("good", new Object[0], new String[]{"int aone"}));
|
||||
|
||||
assertNotNull(e, "An ReflectionException must have occurred by now as we cannot call a methow with wrong signature");
|
||||
assertNotNull(e, "A ReflectionException must have occurred by now as we cannot call a method with wrong signature");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jspc-maven-plugin</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.memcached</groupId>
|
||||
<artifactId>memcached-parent</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-nosql</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-alpn</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-boot-jsp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</Set>
|
||||
</New>
|
||||
</Set>
|
||||
|
||||
<!--
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme">https</Set>
|
||||
<Set name="securePort"><Property name="jetty.httpConfig.securePort" default="8443" /></Set>
|
||||
|
@ -51,16 +51,33 @@
|
|||
<Set name="sendDateHeader">false</Set>
|
||||
<Set name="headerCacheSize">4096</Set>
|
||||
</New>
|
||||
|
||||
-->
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme"><Property name="jetty.httpConfig.secureScheme" default="https" /></Set>
|
||||
<Set name="securePort"><Property name="jetty.httpConfig.securePort" deprecated="jetty.secure.port" default="8443" /></Set>
|
||||
<Set name="outputBufferSize"><Property name="jetty.httpConfig.outputBufferSize" deprecated="jetty.output.buffer.size" default="32768" /></Set>
|
||||
<Set name="outputAggregationSize"><Property name="jetty.httpConfig.outputAggregationSize" deprecated="jetty.output.aggregation.size" default="8192" /></Set>
|
||||
<Set name="requestHeaderSize"><Property name="jetty.httpConfig.requestHeaderSize" deprecated="jetty.request.header.size" default="8192" /></Set>
|
||||
<Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
|
||||
<Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
|
||||
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
|
||||
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="4096" /></Set>
|
||||
<Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
|
||||
<Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
|
||||
<Set name="blockingTimeout"><Property deprecated="jetty.httpConfig.blockingTimeout" name="jetty.httpConfig.blockingTimeout.DEPRECATED" default="-1"/></Set>
|
||||
<Set name="persistentConnectionsEnabled"><Property name="jetty.httpConfig.persistentConnectionsEnabled" default="true"/></Set>
|
||||
<Set name="requestCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.requestCookieCompliance" deprecated="jetty.httpConfig.cookieCompliance" default="RFC6265"/></Arg></Call></Set>
|
||||
<Set name="responseCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.responseCookieCompliance" default="RFC6265"/></Arg></Call></Set>
|
||||
<Set name="multiPartFormDataCompliance"><Call class="org.eclipse.jetty.server.MultiPartFormDataCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.multiPartFormDataCompliance" default="RFC7578"/></Arg></Call></Set>
|
||||
</New>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- extra options -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="stopAtShutdown">true</Set>
|
||||
<Set name="stopTimeout">1000</Set>
|
||||
<Set name="dumpAfterStart">false</Set>
|
||||
<Set name="dumpBeforeStop">false</Set>
|
||||
|
||||
<Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
|
||||
<Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
|
||||
<Set name="dumpAfterStart"><Property name="jetty.server.dumpAfterStart" deprecated="jetty.dump.start" default="false"/></Set>
|
||||
<Set name="dumpBeforeStop"><Property name="jetty.server.dumpBeforeStop" deprecated="jetty.dump.stop" default="false"/></Set>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Set up the list of default configuration classes -->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
|
|
|
@ -49,7 +49,7 @@ public class AnnotationParser extends org.eclipse.jetty.annotations.AnnotationPa
|
|||
|
||||
public AnnotationParser(int javaPlatform)
|
||||
{
|
||||
super(javaPlatform, Opcodes.ASM5);
|
||||
super(javaPlatform, Opcodes.ASM7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-httpservice</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -15,7 +15,6 @@
|
|||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<asm.version>6.2</asm.version>
|
||||
<osgi-version>3.6.0.v20100517</osgi-version>
|
||||
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
|
||||
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-jetty-osgi-context</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-jetty-osgi-server</artifactId>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.Hashtable;
|
|||
|
||||
import org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener;
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.webapp.Configuration;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
||||
|
@ -67,6 +68,16 @@ public class Activator implements BundleActivator
|
|||
});
|
||||
ContextHandlerCollection contexts = new ContextHandlerCollection();
|
||||
server.setHandler(contexts);
|
||||
//server.setDumpAfterStart(true);
|
||||
|
||||
Configuration.ClassList list = new Configuration.ClassList(new String[] {"org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration",
|
||||
"org.eclipse.jetty.webapp.WebXmlConfiguration",
|
||||
"org.eclipse.jetty.webapp.MetaInfConfiguration",
|
||||
"org.eclipse.jetty.webapp.FragmentConfiguration",
|
||||
"org.eclipse.jetty.webapp.JettyWebXmlConfiguration"});
|
||||
server.addBean(list);
|
||||
server.setAttribute("org.eclipse.jetty.webapp.configuration", list);
|
||||
list.setServerDefault(server);
|
||||
|
||||
Dictionary serverProps = new Hashtable();
|
||||
//define the unique name of the server instance
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.13-SNAPSHOT</version>
|
||||
<version>9.4.15-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -78,13 +78,13 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.platform</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<version>3.12.50</version>
|
||||
<version>3.13.100</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.platform</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<version>3.7.100</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -148,7 +148,23 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.aries.spifly</groupId>
|
||||
<artifactId>org.apache.aries.spifly.dynamic.bundle</artifactId>
|
||||
<version>1.0.10</version>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.framework</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-util</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -41,25 +41,34 @@
|
|||
</New>
|
||||
</Set>
|
||||
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme">https</Set>
|
||||
<Set name="securePort"><Property name="jetty.httpConfig.securePort" default="8443" /></Set>
|
||||
<Set name="outputBufferSize">32768</Set>
|
||||
<Set name="requestHeaderSize">8192</Set>
|
||||
<Set name="responseHeaderSize">8192</Set>
|
||||
<Set name="sendServerVersion">true</Set>
|
||||
<Set name="sendDateHeader">false</Set>
|
||||
<Set name="headerCacheSize">4096</Set>
|
||||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
||||
<Set name="secureScheme"><Property name="jetty.httpConfig.secureScheme" default="https" /></Set>
|
||||
<Set name="securePort"><Property name="jetty.httpConfig.securePort" deprecated="jetty.secure.port" default="8443" /></Set>
|
||||
<Set name="outputBufferSize"><Property name="jetty.httpConfig.outputBufferSize" deprecated="jetty.output.buffer.size" default="32768" /></Set>
|
||||
<Set name="outputAggregationSize"><Property name="jetty.httpConfig.outputAggregationSize" deprecated="jetty.output.aggregation.size" default="8192" /></Set>
|
||||
<Set name="requestHeaderSize"><Property name="jetty.httpConfig.requestHeaderSize" deprecated="jetty.request.header.size" default="8192" /></Set>
|
||||
<Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
|
||||
<Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
|
||||
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
|
||||
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="4096" /></Set>
|
||||
<Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
|
||||
<Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
|
||||
<Set name="blockingTimeout"><Property deprecated="jetty.httpConfig.blockingTimeout" name="jetty.httpConfig.blockingTimeout.DEPRECATED" default="-1"/></Set>
|
||||
<Set name="persistentConnectionsEnabled"><Property name="jetty.httpConfig.persistentConnectionsEnabled" default="true"/></Set>
|
||||
<Set name="requestCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.requestCookieCompliance" deprecated="jetty.httpConfig.cookieCompliance" default="RFC6265"/></Arg></Call></Set>
|
||||
<Set name="responseCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.responseCookieCompliance" default="RFC6265"/></Arg></Call></Set>
|
||||
<Set name="multiPartFormDataCompliance"><Call class="org.eclipse.jetty.server.MultiPartFormDataCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.multiPartFormDataCompliance" default="RFC7578"/></Arg></Call></Set>
|
||||
</New>
|
||||
|
||||
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- extra options -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="stopAtShutdown">true</Set>
|
||||
<Set name="stopTimeout">1000</Set>
|
||||
<Set name="dumpAfterStart">false</Set>
|
||||
<Set name="dumpBeforeStop">false</Set>
|
||||
<Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
|
||||
<Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
|
||||
<Set name="dumpAfterStart"><Property name="jetty.server.dumpAfterStart" deprecated="jetty.dump.start" default="false"/></Set>
|
||||
<Set name="dumpBeforeStop"><Property name="jetty.server.dumpBeforeStop" deprecated="jetty.dump.stop" default="false"/></Set>
|
||||
|
||||
|
||||
<!-- =========================================================== -->
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue