mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-04 21:09:13 +00:00
Merge branch 'jetty-9.4.x' of github.com:eclipse/jetty.project into jetty-9.4.x
This commit is contained in:
commit
c85e50a83c
30
VERSION.txt
30
VERSION.txt
@ -1,4 +1,32 @@
|
||||
jetty-9.4.6-SNAPSHOT
|
||||
jetty-9.4.7-SNAPSHOT
|
||||
|
||||
jetty-9.4.6.v20170531 - 31 May 2017
|
||||
+ 523 TLS close behaviour breaking session resumption
|
||||
+ 1108 Please improve logging in SslContextFactory when there are no approved
|
||||
cipher suites
|
||||
+ 1505 Adding jetty.base.uri and jetty.home.uri
|
||||
+ 1514 websocket dump badly formatted
|
||||
+ 1516 Delay starting of WebSocketClient until an attempt to connect is made
|
||||
+ 1520 PropertyUserStore should extract packed config file
|
||||
+ 1526 MongoSessionDataStore old session scavenging is broken due to the
|
||||
missing $ sign in "and" operation
|
||||
+ 1527 Jetty BOM should not depend on jetty-parent
|
||||
+ 1528 Internal HttpClient usages should have common configurable technique
|
||||
+ 1536 Jetty BOM should include more artifacts
|
||||
+ 1538 NPE in Response.putHeaders
|
||||
+ 1539 JarFileResource mishandles paths with spaces
|
||||
+ 1544 Disabling JSR-356 doesn't indicate context it was disabled for
|
||||
+ 1546 Improve handling of quotes in cookies
|
||||
+ 1553 X509.isCertSign() can throw ArrayIndexOutOfBoundsException on
|
||||
non-standard implementations
|
||||
+ 1556 A timing channel in Password.java
|
||||
+ 1558 When creating WebAppContext without session-config and with NO_SESSIONS
|
||||
throws NPE
|
||||
+ 1567 XmlConfiguration will start the same object multiple times
|
||||
+ 1568 ServletUpgradeRequest mangles query strings containing percent-escapes
|
||||
by re-escaping them
|
||||
+ 1569 Allow setting of maxBinaryMessageSize to 0 in WebSocketPolicy
|
||||
+ 1579 NPE in Quoted Quality CSV
|
||||
|
||||
jetty-9.4.5.v20170502 - 02 May 2017
|
||||
+ 304 Review dead code - StringUtil.sidBytesToString
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-ant</artifactId>
|
||||
|
@ -94,82 +94,82 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jstl</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-client</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-java-client</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-java-server</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-alpn-server</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-ant</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-core</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-full-servlet</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-servlet</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>cdi-websocket</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -185,82 +185,82 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>jetty-gcloud-session-manager</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-home</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-client</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-common</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-hpack</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-http-client-transport</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-server</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-infinispan</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaas</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.memcached</groupId>
|
||||
<artifactId>jetty-memcached-sessions</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
@ -270,122 +270,122 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-nosql</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot-jsp</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot-warurl</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-httpservice</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-quickstart</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-spring</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-unixsocket</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util-ajax</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>javax-websocket-client-impl</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>javax-websocket-server-impl</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-api</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-client</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-common</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-server</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
@ -395,7 +395,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-xml</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.cdi</groupId>
|
||||
<artifactId>jetty-cdi-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-documentation</artifactId>
|
||||
<name>Jetty :: Documentation</name>
|
||||
|
@ -37,22 +37,26 @@ Some user-agents might be excluded from compression to avoid common browser bugs
|
||||
The `GzipHandler` is added to the entire server by the `etc/jetty-gzip.xml` file from the `gzip.mod` module.
|
||||
It may also be added to individual contexts in a context xml file.
|
||||
|
||||
____
|
||||
[NOTE]
|
||||
Jetty 9 only compresses using GZip.
|
||||
Using deflate http compression is not supported and will not function.
|
||||
____
|
||||
|
||||
[[gzip-filter-rules]]
|
||||
==== Gzip Rules
|
||||
|
||||
`GzipHandler` will gzip or deflate the content of a response if:
|
||||
`GzipHandler` will gzip the content of a response if:
|
||||
|
||||
* It is mapped to a matching path
|
||||
* The request method is configured to support gzip
|
||||
* The request is not from an excluded User-Agent
|
||||
* accept-encoding header is set to either gzip, deflate or a combination of those
|
||||
* accept-encoding header is set to gzip
|
||||
* The response status code is >=200 and <300
|
||||
* The content length is unknown or more than the minGzipSize initParameter or the minGzipSize is 0(default)
|
||||
* The content-type does not match an excluded mime-type
|
||||
* No content-encoding is specified by the resource
|
||||
|
||||
If both gzip and deflate are specified in the accept-encoding header, then gzip will be used.
|
||||
|
||||
Compressing the content can greatly improve the network bandwidth usage, but at the cost of memory and CPU cycles.
|
||||
The link:#default-servlet[DefaultServlet] is capable of serving pre-compressed static content, which saves memory and CPU.
|
||||
By default, the `GzipHandler` will check to see if pre-compressed content exists, and pass the request through to be handled by the `DefaultServlet`.
|
||||
@ -65,8 +69,6 @@ Content will only be compressed if content length is either unknown or greater t
|
||||
checkGzExists::
|
||||
True by default.
|
||||
If set to false, the handler will not check for pre-compressed content.
|
||||
compressionLevel::
|
||||
The compression level used for deflate compression. (0-9).
|
||||
includedMethods::
|
||||
List of HTTP methods to compress.
|
||||
If not set, only `GET` requests are compressed.
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
[[configuring-sessions-infinispan]]
|
||||
|
||||
=== Clustered Session Management: Inifinspan
|
||||
=== Clustered Session Management: Infinispan
|
||||
|
||||
==== Enabling Infinispan Sessions
|
||||
|
||||
@ -65,9 +65,9 @@ ____
|
||||
If you have updated versions of the jar files automatically downloaded by Jetty, you can place them in the associated `${jetty.base}/lib/` directory and use the `--skip-file-validation=<module name>` command line option to prevent errors when starting your server.
|
||||
____
|
||||
|
||||
==== Configuring Inifinspan Remote Properties
|
||||
==== Configuring Infinispan Remote Properties
|
||||
|
||||
Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the JDBC module:
|
||||
Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the Infinispan module:
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
@ -101,7 +101,7 @@ This allows the possibility that a node may prematurely expire the session, even
|
||||
Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`.
|
||||
____
|
||||
|
||||
==== Configuring Embedded Inifinspan Clustering
|
||||
==== Configuring Embedded Infinispan Clustering
|
||||
|
||||
During testing, it can be helpful to run an in-process instance of Infinispan.
|
||||
To enable this you will first need to enable the `session-store-infinispan-embedded` link:#startup-modules[module] for your link:#startup-base-and-home[Jetty base] using the `--add-to-start` argument on the command line.
|
||||
@ -140,7 +140,7 @@ In addition to adding these modules to the classpath of the server it also added
|
||||
|
||||
==== Configuring Inifinspan Embedded Properties
|
||||
|
||||
Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the JDBC module:
|
||||
Opening the `start.d/session-store-infinispan-embedded.ini` will show a list of all the configurable options for the Infinispan module:
|
||||
|
||||
[source, screen, subs="{sub-order}"]
|
||||
----
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.fcgi</groupId>
|
||||
<artifactId>fcgi-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.gcloud</groupId>
|
||||
<artifactId>gcloud-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
|
@ -61,8 +61,8 @@ public class CompressedContentFormat
|
||||
return true;
|
||||
|
||||
int dashdash = tag.indexOf("--");
|
||||
if (dashdash>0)
|
||||
return etag.regionMatches(0,tag,0,dashdash-2);
|
||||
if (dashdash>0 && dashdash==etag.length()-1)
|
||||
return etag.regionMatches(0,tag,0,dashdash);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -37,13 +37,16 @@ import org.eclipse.jetty.http.HostPortHttpField;
|
||||
import org.eclipse.jetty.http.HttpFields;
|
||||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.http.HttpScheme;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http2.BufferingFlowControlStrategy;
|
||||
import org.eclipse.jetty.http2.ErrorCode;
|
||||
import org.eclipse.jetty.http2.FlowControlStrategy;
|
||||
import org.eclipse.jetty.http2.HTTP2Session;
|
||||
import org.eclipse.jetty.http2.HTTP2Stream;
|
||||
import org.eclipse.jetty.http2.ISession;
|
||||
import org.eclipse.jetty.http2.IStream;
|
||||
import org.eclipse.jetty.http2.api.Session;
|
||||
import org.eclipse.jetty.http2.api.Stream;
|
||||
import org.eclipse.jetty.http2.api.server.ServerSessionListener;
|
||||
@ -52,6 +55,7 @@ import org.eclipse.jetty.http2.frames.GoAwayFrame;
|
||||
import org.eclipse.jetty.http2.frames.HeadersFrame;
|
||||
import org.eclipse.jetty.http2.frames.ResetFrame;
|
||||
import org.eclipse.jetty.http2.frames.SettingsFrame;
|
||||
import org.eclipse.jetty.http2.frames.WindowUpdateFrame;
|
||||
import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
@ -845,7 +849,7 @@ public abstract class FlowControlStrategyTest
|
||||
{
|
||||
return InvocationType.NON_BLOCKING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
@ -916,7 +920,7 @@ public abstract class FlowControlStrategyTest
|
||||
{
|
||||
return InvocationType.NON_BLOCKING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
@ -997,7 +1001,7 @@ public abstract class FlowControlStrategyTest
|
||||
{
|
||||
return InvocationType.NON_BLOCKING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void failed(Throwable x)
|
||||
{
|
||||
@ -1008,4 +1012,71 @@ public abstract class FlowControlStrategyTest
|
||||
Assert.assertTrue(resetLatch.await(5, TimeUnit.SECONDS));
|
||||
Assert.assertTrue(dataLatch.await(5, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoWindowUpdateForRemotelyClosedStream() throws Exception
|
||||
{
|
||||
List<Callback> callbacks = new ArrayList<>();
|
||||
start(new ServerSessionListener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public Stream.Listener onNewStream(Stream stream, HeadersFrame frame)
|
||||
{
|
||||
return new Stream.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public void onData(Stream stream, DataFrame frame, Callback callback)
|
||||
{
|
||||
callbacks.add(callback);
|
||||
if (frame.isEndStream())
|
||||
{
|
||||
// Succeed the callbacks when the stream is already remotely closed.
|
||||
callbacks.forEach(Callback::succeeded);
|
||||
MetaData.Response response = new MetaData.Response(HttpVersion.HTTP_2, HttpStatus.OK_200, new HttpFields());
|
||||
stream.headers(new HeadersFrame(stream.getId(), response, null, true), Callback.NOOP);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
List<WindowUpdateFrame> sessionWindowUpdates = new ArrayList<>();
|
||||
List<WindowUpdateFrame> streamWindowUpdates = new ArrayList<>();
|
||||
client.setFlowControlStrategyFactory(() -> new BufferingFlowControlStrategy(0.5F)
|
||||
{
|
||||
@Override
|
||||
public void onWindowUpdate(ISession session, IStream stream, WindowUpdateFrame frame)
|
||||
{
|
||||
if (frame.getStreamId() == 0)
|
||||
sessionWindowUpdates.add(frame);
|
||||
else
|
||||
streamWindowUpdates.add(frame);
|
||||
super.onWindowUpdate(session, stream, frame);
|
||||
}
|
||||
});
|
||||
|
||||
Session session = newClient(new Session.Listener.Adapter());
|
||||
MetaData.Request metaData = newRequest("POST", new HttpFields());
|
||||
HeadersFrame frame = new HeadersFrame(metaData, null, false);
|
||||
FuturePromise<Stream> streamPromise = new FuturePromise<>();
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
session.newStream(frame, streamPromise, new Stream.Listener.Adapter()
|
||||
{
|
||||
@Override
|
||||
public void onHeaders(Stream stream, HeadersFrame frame)
|
||||
{
|
||||
if (frame.isEndStream())
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
Stream stream = streamPromise.get(5, TimeUnit.SECONDS);
|
||||
|
||||
ByteBuffer data = ByteBuffer.allocate(FlowControlStrategy.DEFAULT_WINDOW_SIZE - 1);
|
||||
stream.data(new DataFrame(stream.getId(), data, true), Callback.NOOP);
|
||||
|
||||
Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||
|
||||
Assert.assertTrue(sessionWindowUpdates.size() > 0);
|
||||
Assert.assertEquals(0, streamWindowUpdates.size());
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -130,10 +130,10 @@ public class BufferingFlowControlStrategy extends AbstractFlowControlStrategy
|
||||
Frame[] windowFrames = Frame.EMPTY_ARRAY;
|
||||
if (stream != null)
|
||||
{
|
||||
if (stream.isClosed())
|
||||
if (stream.isRemotelyClosed())
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Data consumed, {} bytes, ignoring update stream recv window for closed {}", length, stream);
|
||||
LOG.debug("Data consumed, {} bytes, ignoring update stream recv window for remotely closed {}", length, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -243,6 +243,12 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
||||
complete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvocationType getInvocationType()
|
||||
{
|
||||
return InvocationType.NON_BLOCKING;
|
||||
}
|
||||
|
||||
private void complete()
|
||||
{
|
||||
notIdle();
|
||||
@ -398,14 +404,14 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
||||
/**
|
||||
* This method is called when receiving a GO_AWAY from the other peer.
|
||||
* We check the close state to act appropriately:
|
||||
*
|
||||
* * NOT_CLOSED: we move to REMOTELY_CLOSED and queue a disconnect, so
|
||||
* that the content of the queue is written, and then the connection
|
||||
* closed. We notify the application after being terminated.
|
||||
* See <code>HTTP2Session.ControlEntry#succeeded()</code>
|
||||
*
|
||||
* * In all other cases, we do nothing since other methods are already
|
||||
* performing their actions.
|
||||
* <ul>
|
||||
* <li>NOT_CLOSED: we move to REMOTELY_CLOSED and queue a disconnect, so
|
||||
* that the content of the queue is written, and then the connection
|
||||
* closed. We notify the application after being terminated.
|
||||
* See <code>HTTP2Session.ControlEntry#succeeded()</code></li>
|
||||
* <li>In all other cases, we do nothing since other methods are already
|
||||
* performing their actions.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param frame the GO_AWAY frame that has been received.
|
||||
* @see #close(int, String, Callback)
|
||||
@ -567,21 +573,21 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
||||
/**
|
||||
* Invoked internally and by applications to send a GO_AWAY frame to the
|
||||
* other peer. We check the close state to act appropriately:
|
||||
* <ul>
|
||||
* <li>NOT_CLOSED: we move to LOCALLY_CLOSED and queue a GO_AWAY. When the
|
||||
* GO_AWAY has been written, it will only cause the output to be shut
|
||||
* down (not the connection closed), so that the application can still
|
||||
* read frames arriving from the other peer.
|
||||
* Ideally the other peer will notice the GO_AWAY and close the connection.
|
||||
* When that happen, we close the connection from {@link #onShutdown()}.
|
||||
* Otherwise, the idle timeout mechanism will close the connection, see
|
||||
* {@link #onIdleTimeout()}.</li>
|
||||
* <li>In all other cases, we do nothing since other methods are already
|
||||
* performing their actions.</li>
|
||||
* </ul>
|
||||
*
|
||||
* * NOT_CLOSED: we move to LOCALLY_CLOSED and queue a GO_AWAY. When the
|
||||
* GO_AWAY has been written, it will only cause the output to be shut
|
||||
* down (not the connection closed), so that the application can still
|
||||
* read frames arriving from the other peer.
|
||||
* Ideally the other peer will notice the GO_AWAY and close the connection.
|
||||
* When that happen, we close the connection from {@link #onShutdown()}.
|
||||
* Otherwise, the idle timeout mechanism will close the connection, see
|
||||
* {@link #onIdleTimeout()}.
|
||||
*
|
||||
* * In all other cases, we do nothing since other methods are already
|
||||
* performing their actions.
|
||||
*
|
||||
* @param error the error code
|
||||
* @param reason the reason
|
||||
* @param error the error code
|
||||
* @param reason the reason
|
||||
* @param callback the callback to invoke when the operation is complete
|
||||
* @see #onGoAway(GoAwayFrame)
|
||||
* @see #onShutdown()
|
||||
@ -841,19 +847,18 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
||||
* A typical close by a remote peer involves a GO_AWAY frame followed by TCP FIN.
|
||||
* This method is invoked when the TCP FIN is received, or when an exception is
|
||||
* thrown while reading, and we check the close state to act appropriately:
|
||||
*
|
||||
* * NOT_CLOSED: means that the remote peer did not send a GO_AWAY (abrupt close)
|
||||
* or there was an exception while reading, and therefore we terminate.
|
||||
*
|
||||
* * LOCALLY_CLOSED: we have sent the GO_AWAY to the remote peer, which received
|
||||
* it and closed the connection; we queue a disconnect to close the connection
|
||||
* on the local side.
|
||||
* The GO_AWAY just shutdown the output, so we need this step to make sure the
|
||||
* connection is closed. See {@link #close(int, String, Callback)}.
|
||||
*
|
||||
* * REMOTELY_CLOSED: we received the GO_AWAY, and the TCP FIN afterwards, so we
|
||||
* do nothing since the handling of the GO_AWAY will take care of closing the
|
||||
* connection. See {@link #onGoAway(GoAwayFrame)}.
|
||||
* <ul>
|
||||
* <li>NOT_CLOSED: means that the remote peer did not send a GO_AWAY (abrupt close)
|
||||
* or there was an exception while reading, and therefore we terminate.</li>
|
||||
* <li>LOCALLY_CLOSED: we have sent the GO_AWAY to the remote peer, which received
|
||||
* it and closed the connection; we queue a disconnect to close the connection
|
||||
* on the local side.
|
||||
* The GO_AWAY just shutdown the output, so we need this step to make sure the
|
||||
* connection is closed. See {@link #close(int, String, Callback)}.</li>
|
||||
* <li>REMOTELY_CLOSED: we received the GO_AWAY, and the TCP FIN afterwards, so we
|
||||
* do nothing since the handling of the GO_AWAY will take care of closing the
|
||||
* connection. See {@link #onGoAway(GoAwayFrame)}.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see #onGoAway(GoAwayFrame)
|
||||
* @see #close(int, String, Callback)
|
||||
@ -898,18 +903,17 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
||||
/**
|
||||
* This method is invoked when the idle timeout triggers. We check the close state
|
||||
* to act appropriately:
|
||||
*
|
||||
* * NOT_CLOSED: it's a real idle timeout, we just initiate a close, see
|
||||
* {@link #close(int, String, Callback)}.
|
||||
*
|
||||
* * LOCALLY_CLOSED: we have sent a GO_AWAY and only shutdown the output, but the
|
||||
* other peer did not close the connection so we never received the TCP FIN, and
|
||||
* therefore we terminate.
|
||||
*
|
||||
* * REMOTELY_CLOSED: the other peer sent us a GO_AWAY, we should have queued a
|
||||
* disconnect, but for some reason it was not processed (for example, queue was
|
||||
* stuck because of TCP congestion), therefore we terminate.
|
||||
* See {@link #onGoAway(GoAwayFrame)}.
|
||||
* <ul>
|
||||
* <li>NOT_CLOSED: it's a real idle timeout, we just initiate a close, see
|
||||
* {@link #close(int, String, Callback)}.</li>
|
||||
* <li>LOCALLY_CLOSED: we have sent a GO_AWAY and only shutdown the output, but the
|
||||
* other peer did not close the connection so we never received the TCP FIN, and
|
||||
* therefore we terminate.</li>
|
||||
* <li>REMOTELY_CLOSED: the other peer sent us a GO_AWAY, we should have queued a
|
||||
* disconnect, but for some reason it was not processed (for example, queue was
|
||||
* stuck because of TCP congestion), therefore we terminate.
|
||||
* See {@link #onGoAway(GoAwayFrame)}.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @return true if the session should be closed, false otherwise
|
||||
* @see #onGoAway(GoAwayFrame)
|
||||
|
@ -152,6 +152,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback
|
||||
return closeState.get() == CloseState.CLOSED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRemotelyClosed()
|
||||
{
|
||||
return closeState.get() == CloseState.REMOTELY_CLOSED;
|
||||
|
@ -105,4 +105,10 @@ public interface IStream extends Stream, Closeable
|
||||
* {@link #getIdleTimeout() idle timeout} is postponed.</p>
|
||||
*/
|
||||
public void notIdle();
|
||||
|
||||
/**
|
||||
* @return whether the stream is closed remotely.
|
||||
* @see #isClosed()
|
||||
*/
|
||||
boolean isRemotelyClosed();
|
||||
}
|
||||
|
@ -52,10 +52,10 @@ public class SimpleFlowControlStrategy extends AbstractFlowControlStrategy
|
||||
Frame[] streamFrame = Frame.EMPTY_ARRAY;
|
||||
if (stream != null)
|
||||
{
|
||||
if (stream.isClosed())
|
||||
if (stream.isRemotelyClosed())
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Data consumed, ignoring update stream recv window by {} for closed {}", length, stream);
|
||||
LOG.debug("Data consumed, ignoring update stream recv window by {} for remotely closed {}", length, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-parent</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
|
@ -147,14 +147,14 @@ public class JaspiTest
|
||||
@Test
|
||||
public void testNoConstraint() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /ctx/test HTTP/1.0\n\n");
|
||||
String response = _connector.getResponse("GET /ctx/test HTTP/1.0\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConstraintNoAuth() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n\n");
|
||||
String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 401 Unauthorized"));
|
||||
assertThat(response,Matchers.containsString("WWW-Authenticate: basic realm=\"TestRealm\""));
|
||||
}
|
||||
@ -162,7 +162,7 @@ public class JaspiTest
|
||||
@Test
|
||||
public void testConstraintWrongAuth() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n"+
|
||||
String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n"+
|
||||
"Authorization: Basic " + B64Code.encode("user:wrong") + "\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 401 Unauthorized"));
|
||||
assertThat(response,Matchers.containsString("WWW-Authenticate: basic realm=\"TestRealm\""));
|
||||
@ -171,7 +171,7 @@ public class JaspiTest
|
||||
@Test
|
||||
public void testConstraintAuth() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n"+
|
||||
String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n"+
|
||||
"Authorization: Basic " + B64Code.encode("user:password") + "\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
}
|
||||
@ -179,14 +179,14 @@ public class JaspiTest
|
||||
@Test
|
||||
public void testOtherNoAuth() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /other/test HTTP/1.0\n\n");
|
||||
String response = _connector.getResponse("GET /other/test HTTP/1.0\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 403 Forbidden"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOtherAuth() throws Exception
|
||||
{
|
||||
String response = _connector.getResponses("GET /other/test HTTP/1.0\n"+
|
||||
String response = _connector.getResponse("GET /other/test HTTP/1.0\n"+
|
||||
"X-Forwarded-User: user\n\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
@ -14,6 +14,16 @@
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Import-Package>javax.mail.*;resolution:=optional,*</Import-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test-jetty-osgi-server</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-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.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -100,7 +100,6 @@ public class TestJettyOSGiBootCore
|
||||
res.add(mavenBundle().groupId( "org.eclipse.jetty.toolchain" ).artifactId( "jetty-osgi-servlet-api" ).versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId( "javax.annotation" ).artifactId( "javax.annotation-api" ).versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId( "org.apache.geronimo.specs" ).artifactId( "geronimo-jta_1.1_spec" ).version("1.1.1").noStart());
|
||||
res.add(mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.mail.glassfish" ).version( "1.4.1.v201005082020" ).noStart());
|
||||
|
||||
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-util" ).versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-deploy" ).versionAsInProject().noStart());
|
||||
|
@ -111,6 +111,7 @@ public class TestJettyOSGiBootWithAnnotations
|
||||
public static List<Option> annotationDependencies()
|
||||
{
|
||||
List<Option> res = new ArrayList<Option>();
|
||||
res.add(mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.mail.glassfish" ).version( "1.4.1.v201005082020" ).noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.tests").artifactId("test-container-initializer").versionAsInProject());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.tests").artifactId("test-mock-resources").versionAsInProject());
|
||||
//test webapp bundle
|
||||
@ -127,16 +128,7 @@ public class TestJettyOSGiBootWithAnnotations
|
||||
TestOSGiUtil.debugBundles(bundleContext);
|
||||
}
|
||||
|
||||
// at the moment can't run httpservice with jsp at the same time.
|
||||
// that is a regression in jetty-9
|
||||
@Ignore
|
||||
@Test
|
||||
public void testHttpService() throws Exception
|
||||
{
|
||||
TestOSGiUtil.testHttpServiceGreetings(bundleContext, "http", TestJettyOSGiBootCore.DEFAULT_HTTP_PORT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void testIndex() throws Exception
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-proxy</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-rewrite</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
|
@ -158,7 +158,7 @@ public class AliasedConstraintTest
|
||||
request.append("Connection: close\r\n");
|
||||
request.append("\r\n");
|
||||
|
||||
String response = connector.getResponses(request.toString());
|
||||
String response = connector.getResponse(request.toString());
|
||||
|
||||
switch (expectedStatusCode)
|
||||
{
|
||||
|
@ -130,15 +130,15 @@ public class DataConstraintsTest
|
||||
_server.start();
|
||||
|
||||
String response;
|
||||
response = _connector.getResponses("GET /ctx/some/thing HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/some/thing HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/integral/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/integral/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
Assert.assertThat(response, Matchers.containsString("Location: BWTP://"));
|
||||
Assert.assertThat(response, Matchers.containsString(":9999"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/integral/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/integral/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -162,15 +162,15 @@ public class DataConstraintsTest
|
||||
_server.start();
|
||||
|
||||
String response;
|
||||
response = _connector.getResponses("GET /ctx/some/thing HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/some/thing HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
Assert.assertThat(response, Matchers.containsString("Location: BWTP://"));
|
||||
Assert.assertThat(response, Matchers.containsString(":9999"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -194,10 +194,10 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -222,16 +222,16 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
|
||||
response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -256,16 +256,16 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
|
||||
response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -295,25 +295,25 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
|
||||
response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found"));
|
||||
|
||||
response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
@ -337,16 +337,16 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
}
|
||||
@ -371,16 +371,16 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
}
|
||||
@ -409,16 +409,16 @@ public class DataConstraintsTest
|
||||
|
||||
String response;
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized"));
|
||||
|
||||
response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n");
|
||||
response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n");
|
||||
response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n");
|
||||
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
|
||||
|
||||
}
|
||||
|
@ -257,14 +257,14 @@ public class SpecExampleConstraintTest
|
||||
//There are uncovered methods for GET/POST at url /*
|
||||
//without deny-uncovered-http-methods they should be accessible
|
||||
String response;
|
||||
response = _connector.getResponses("GET /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
|
||||
//set deny-uncovered-http-methods true
|
||||
_security.setDenyUncoveredHttpMethods(true);
|
||||
|
||||
//check they cannot be accessed
|
||||
response = _connector.getResponses("GET /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("GET /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
assertTrue(response.startsWith("HTTP/1.1 403 Forbidden"));
|
||||
}
|
||||
finally
|
||||
@ -294,39 +294,39 @@ public class SpecExampleConstraintTest
|
||||
*/
|
||||
|
||||
//a user in role HOMEOWNER is forbidden HEAD request
|
||||
response = _connector.getResponses("HEAD /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
response = _connector.getResponse("HEAD /ctx/index.html HTTP/1.0\r\n\r\n");
|
||||
assertTrue(response.startsWith("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connector.getResponses("HEAD /ctx/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("HEAD /ctx/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" +
|
||||
"\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connector.getResponses("HEAD /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("HEAD /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" +
|
||||
"\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
response = _connector.getResponses("HEAD /ctx/acme/retail/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("HEAD /ctx/acme/retail/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" +
|
||||
"\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 403 Forbidden"));
|
||||
|
||||
//a user in role CONTRACTOR can do a GET
|
||||
response = _connector.getResponses("GET /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("GET /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("chris:password") + "\r\n" +
|
||||
"\r\n");
|
||||
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
|
||||
//a user in role CONTRACTOR can only do a post if confidential
|
||||
response = _connector.getResponses("POST /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("POST /ctx/acme/wholesale/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("chris:password") + "\r\n" +
|
||||
"\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 403 !"));
|
||||
|
||||
//a user in role HOMEOWNER can do a GET
|
||||
response = _connector.getResponses("GET /ctx/acme/retail/index.html HTTP/1.0\r\n" +
|
||||
response = _connector.getResponse("GET /ctx/acme/retail/index.html HTTP/1.0\r\n" +
|
||||
"Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" +
|
||||
"\r\n");
|
||||
assertThat(response,startsWith("HTTP/1.1 200 OK"));
|
||||
|
@ -2,7 +2,7 @@
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
|
@ -28,4 +28,26 @@
|
||||
<Set name="sslSessionTimeout"><Property name="jetty.sslContext.sslSessionTimeout" default="-1"/></Set>
|
||||
<Set name="RenegotiationAllowed"><Property name="jetty.sslContext.renegotiationAllowed" default="true"/></Set>
|
||||
<Set name="RenegotiationLimit"><Property name="jetty.sslContext.renegotiationLimit" default="5"/></Set>
|
||||
|
||||
<!-- Example of how to configure a PKIX Certificate Path revocation Checker
|
||||
<Call id="pkixPreferCrls" class="java.security.cert.PKIXRevocationChecker$Option" name="valueOf"><Arg>PREFER_CRLS</Arg></Call>
|
||||
<Call id="pkixSoftFail" class="java.security.cert.PKIXRevocationChecker$Option" name="valueOf"><Arg>SOFT_FAIL</Arg></Call>
|
||||
<Call id="pkixNoFallback" class="java.security.cert.PKIXRevocationChecker$Option" name="valueOf"><Arg>NO_FALLBACK</Arg></Call>
|
||||
<Call class="java.security.cert.CertPathBuilder" name="getInstance">
|
||||
<Arg>PKIX</Arg>
|
||||
<Call id="pkixRevocationChecker" name="getRevocationChecker">
|
||||
<Call name="setOptions">
|
||||
<Arg>
|
||||
<Call class="java.util.EnumSet" name="of">
|
||||
<Arg><Ref refid="pkixPreferCrls"/></Arg>
|
||||
<Arg><Ref refid="pkixSoftFail"/></Arg>
|
||||
<Arg><Ref refid="pkixNoFallback"/></Arg>
|
||||
</Call>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Call>
|
||||
</Call>
|
||||
<Set name="PkixCertPathChecker"><Ref refid="pkixRevocationChecker"/></Set>
|
||||
-->
|
||||
|
||||
</Configure>
|
||||
|
@ -25,7 +25,6 @@ import java.io.InputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.ParameterMetaData;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@ -33,11 +32,10 @@ import java.sql.Statement;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.eclipse.jetty.util.ClassLoadingObjectInputStream;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
@ -53,6 +51,11 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
{
|
||||
final static Logger LOG = Log.getLogger("org.eclipse.jetty.server.session");
|
||||
|
||||
/**
|
||||
* Used for Oracle and other databases where "" is treated as NULL
|
||||
*/
|
||||
public static final String NULL_CONTEXT_PATH = "/";
|
||||
|
||||
protected boolean _initialized = false;
|
||||
private DatabaseAdaptor _dbAdaptor;
|
||||
private SessionTableSchema _sessionTableSchema;
|
||||
@ -275,27 +278,24 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
" values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
}
|
||||
|
||||
public PreparedStatement getUpdateSessionStatement(Connection connection, String canonicalContextPath)
|
||||
public PreparedStatement getUpdateSessionStatement(Connection connection, String id, SessionContext context)
|
||||
throws SQLException
|
||||
{
|
||||
String s = "update "+getSchemaTableName()+
|
||||
" set "+getLastNodeColumn()+" = ?, "+getAccessTimeColumn()+" = ?, "+
|
||||
getLastAccessTimeColumn()+" = ?, "+getLastSavedTimeColumn()+" = ?, "+getExpiryTimeColumn()+" = ?, "+
|
||||
getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where ";
|
||||
getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?";
|
||||
|
||||
if (canonicalContextPath == null || "".equals(canonicalContextPath))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
s = s+getIdColumn()+" = ? and "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ?";
|
||||
return connection.prepareStatement(s);
|
||||
}
|
||||
}
|
||||
|
||||
return connection.prepareStatement(s+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?");
|
||||
String cp = context.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement(s);
|
||||
statement.setString(8, id);
|
||||
statement.setString(9, cp);
|
||||
statement.setString(10, context.getVhost());
|
||||
return statement;
|
||||
}
|
||||
|
||||
|
||||
@ -305,27 +305,16 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
if (_dbAdaptor == null)
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
|
||||
if (canonicalContextPath == null || "".equals(canonicalContextPath))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+" where "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ? and "+getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?");
|
||||
statement.setString(1, vhost);
|
||||
statement.setLong(2, expiry);
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
String cp = canonicalContextPath;
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+" where "+getContextPathColumn()+" = ? and "+
|
||||
getVirtualHostColumn()+" = ? and "+
|
||||
getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?");
|
||||
|
||||
statement.setString(1, canonicalContextPath);
|
||||
statement.setString(1, cp);
|
||||
statement.setString(2, vhost);
|
||||
statement.setLong(3, expiry);
|
||||
return statement;
|
||||
@ -338,21 +327,9 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
if (_dbAdaptor == null)
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
if (sessionContext.getCanonicalContextPath() == null || "".equals(sessionContext.getCanonicalContextPath()))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+" where "+
|
||||
getLastNodeColumn() + " = ? and "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ? and "+getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?");
|
||||
statement.setString(1, sessionContext.getWorkerName());
|
||||
statement.setString(2, sessionContext.getVhost());
|
||||
statement.setLong(3, expiry);
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
String cp = sessionContext.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+" where "+
|
||||
@ -362,7 +339,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?");
|
||||
|
||||
statement.setString(1, sessionContext.getWorkerName());
|
||||
statement.setString(2, sessionContext.getCanonicalContextPath());
|
||||
statement.setString(2, cp);
|
||||
statement.setString(3, sessionContext.getVhost());
|
||||
statement.setLong(4, expiry);
|
||||
return statement;
|
||||
@ -382,52 +359,27 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
}
|
||||
|
||||
|
||||
public PreparedStatement getCheckSessionExistsStatement (Connection connection, String canonicalContextPath)
|
||||
public PreparedStatement getCheckSessionExistsStatement (Connection connection, SessionContext context)
|
||||
throws SQLException
|
||||
{
|
||||
if (_dbAdaptor == null)
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
|
||||
if (canonicalContextPath == null || "".equals(canonicalContextPath))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ?");
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
String cp = context.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+
|
||||
" from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+
|
||||
getContextPathColumn()+" = ? and "+
|
||||
getVirtualHostColumn()+" = ?");
|
||||
statement.setString(2, cp);
|
||||
statement.setString(3, context.getVhost());
|
||||
return statement;
|
||||
}
|
||||
|
||||
public void fillCheckSessionExistsStatement (PreparedStatement statement, String id, SessionContext contextId)
|
||||
throws SQLException
|
||||
{
|
||||
statement.clearParameters();
|
||||
ParameterMetaData metaData = statement.getParameterMetaData();
|
||||
if (metaData.getParameterCount() < 3)
|
||||
{
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getVhost());
|
||||
}
|
||||
else
|
||||
{
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getCanonicalContextPath());
|
||||
statement.setString(3, contextId.getVhost());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public PreparedStatement getLoadStatement (Connection connection, String id, SessionContext contextId)
|
||||
throws SQLException
|
||||
@ -436,26 +388,15 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
|
||||
if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath()))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("select * from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getVhost());
|
||||
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
String cp = contextId.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull()&& StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("select * from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getCanonicalContextPath());
|
||||
statement.setString(2, cp);
|
||||
statement.setString(3, contextId.getVhost());
|
||||
|
||||
return statement;
|
||||
@ -469,28 +410,21 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
if (_dbAdaptor == null)
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
String cp = contextId.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
String s = "update "+getSchemaTableName()+
|
||||
" set "+getLastNodeColumn()+" = ?, "+getAccessTimeColumn()+" = ?, "+
|
||||
getLastAccessTimeColumn()+" = ?, "+getLastSavedTimeColumn()+" = ?, "+getExpiryTimeColumn()+" = ?, "+
|
||||
getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where ";
|
||||
getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?";
|
||||
|
||||
if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath()))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement(s+getIdColumn()+" = ? and "+
|
||||
getContextPathColumn()+" is null and "+
|
||||
getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getVhost());
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
PreparedStatement statement = connection.prepareStatement(s+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getCanonicalContextPath());
|
||||
statement.setString(3, contextId.getVhost());
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement(s);
|
||||
statement.setString(8, id);
|
||||
statement.setString(9, cp);
|
||||
statement.setString(10, contextId.getVhost());
|
||||
|
||||
return statement;
|
||||
}
|
||||
@ -505,25 +439,15 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
|
||||
throw new IllegalStateException("No DB adaptor");
|
||||
|
||||
|
||||
if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath()))
|
||||
{
|
||||
if (_dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("delete from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getVhost());
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
String cp = contextId.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("delete from "+getSchemaTableName()+
|
||||
" where "+getIdColumn()+" = ? and "+getContextPathColumn()+
|
||||
" = ? and "+getVirtualHostColumn()+" = ?");
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, contextId.getCanonicalContextPath());
|
||||
statement.setString(2, cp);
|
||||
statement.setString(3, contextId.getVhost());
|
||||
|
||||
return statement;
|
||||
@ -722,8 +646,8 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
data.setLastNode(result.getString(_sessionTableSchema.getLastNodeColumn()));
|
||||
data.setLastSaved(result.getLong(_sessionTableSchema.getLastSavedTimeColumn()));
|
||||
data.setExpiry(result.getLong(_sessionTableSchema.getExpiryTimeColumn()));
|
||||
data.setContextPath(result.getString(_sessionTableSchema.getContextPathColumn())); //TODO needed? this is part of the key now
|
||||
data.setVhost(result.getString(_sessionTableSchema.getVirtualHostColumn())); //TODO needed??? this is part of the key now
|
||||
data.setContextPath(_context.getCanonicalContextPath());
|
||||
data.setVhost(_context.getVhost());
|
||||
|
||||
try (InputStream is = _dbAdaptor.getBlobInputStream(result, _sessionTableSchema.getMapColumn());
|
||||
ClassLoadingObjectInputStream ois = new ClassLoadingObjectInputStream(is))
|
||||
@ -815,7 +739,13 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
try (PreparedStatement statement = connection.prepareStatement(s))
|
||||
{
|
||||
statement.setString(1, id); //session id
|
||||
statement.setString(2, _context.getCanonicalContextPath()); //context path
|
||||
|
||||
String cp = _context.getCanonicalContextPath();
|
||||
if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp))
|
||||
cp = NULL_CONTEXT_PATH;
|
||||
|
||||
statement.setString(2, cp); //context path
|
||||
|
||||
statement.setString(3, _context.getVhost()); //first vhost
|
||||
statement.setString(4, data.getLastNode());//my node id
|
||||
statement.setLong(5, data.getAccessed());//accessTime
|
||||
@ -845,11 +775,10 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
private void doUpdate (String id, SessionData data)
|
||||
throws Exception
|
||||
{
|
||||
//TODO check if it is actually dirty && try to optimize the writing of lastAccessTime and expiryTime
|
||||
try (Connection connection = _dbAdaptor.getConnection())
|
||||
{
|
||||
connection.setAutoCommit(true);
|
||||
try (PreparedStatement statement = _sessionTableSchema.getUpdateSessionStatement(connection, _context.getCanonicalContextPath()))
|
||||
try (PreparedStatement statement = _sessionTableSchema.getUpdateSessionStatement(connection, data.getId(), _context))
|
||||
{
|
||||
statement.setString(1, data.getLastNode());//should be my node id
|
||||
statement.setLong(2, data.getAccessed());//accessTime
|
||||
@ -865,19 +794,6 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
byte[] bytes = baos.toByteArray();
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
|
||||
statement.setBinaryStream(7, bais, bytes.length);//attribute map as blob
|
||||
|
||||
if ((_context.getCanonicalContextPath() == null || "".equals(_context.getCanonicalContextPath())) && _dbAdaptor.isEmptyStringNull())
|
||||
{
|
||||
statement.setString(8, id);
|
||||
statement.setString(9, _context.getVhost());
|
||||
}
|
||||
else
|
||||
{
|
||||
statement.setString(8, id);
|
||||
statement.setString(9, _context.getCanonicalContextPath());
|
||||
statement.setString(10, _context.getVhost());
|
||||
}
|
||||
|
||||
statement.executeUpdate();
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
@ -968,11 +884,11 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
if (!notExpiredInDB.isEmpty())
|
||||
{
|
||||
//we have some sessions to check
|
||||
try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context.getCanonicalContextPath()))
|
||||
try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context))
|
||||
{
|
||||
for (String k: notExpiredInDB)
|
||||
{
|
||||
_sessionTableSchema.fillCheckSessionExistsStatement (checkSessionExists, k, _context);
|
||||
checkSessionExists.setString(1, k);
|
||||
try (ResultSet result = checkSessionExists.executeQuery())
|
||||
{
|
||||
if (!result.next())
|
||||
@ -1044,9 +960,9 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
|
||||
connection.setAutoCommit(true);
|
||||
|
||||
//non-expired session exists?
|
||||
try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context.getCanonicalContextPath()))
|
||||
try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context))
|
||||
{
|
||||
_sessionTableSchema.fillCheckSessionExistsStatement (checkSessionExists, id, _context);
|
||||
checkSessionExists.setString(1, id);
|
||||
try (ResultSet result = checkSessionExists.executeQuery())
|
||||
{
|
||||
if (!result.next())
|
||||
|
@ -151,9 +151,7 @@ public class CheckReverseProxyHeadersTest
|
||||
try
|
||||
{
|
||||
server.start();
|
||||
connector.getResponses("GET / HTTP/1.1\r\n" +"Connection: close\r\n" + headers + "\r\n\r\n",
|
||||
1000,TimeUnit.SECONDS);
|
||||
|
||||
connector.getResponse("GET / HTTP/1.1\r\n" +"Connection: close\r\n" + headers + "\r\n\r\n");
|
||||
Error error = validationHandler.getError();
|
||||
|
||||
if (error != null)
|
||||
|
@ -579,7 +579,7 @@ public class HttpOutputTest
|
||||
_handler._byteBuffer = BufferUtil.allocateDirect(8192);
|
||||
_handler._async = true;
|
||||
|
||||
String response = _connector.getResponses("GET / HTTP/1.0\nHost: localhost:80\n\n");
|
||||
String response = _connector.getResponse("GET / HTTP/1.0\nHost: localhost:80\n\n");
|
||||
assertThat(response, containsString("HTTP/1.1 200 OK"));
|
||||
assertThat(response, Matchers.not(containsString("Content-Length")));
|
||||
assertThat(response, endsWith(toUTF8String(big)));
|
||||
|
@ -79,7 +79,7 @@ public class LocalConnectorTest
|
||||
}
|
||||
});
|
||||
|
||||
_connector.getResponses("" +
|
||||
_connector.getResponse("" +
|
||||
"GET / HTTP/1.1\r\n" +
|
||||
"Host: localhost\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
@ -92,7 +92,7 @@ public class LocalConnectorTest
|
||||
@Test
|
||||
public void testOneGET() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("GET /R1 HTTP/1.0\r\n\r\n");
|
||||
String response=_connector.getResponse("GET /R1 HTTP/1.0\r\n\r\n");
|
||||
assertThat(response,containsString("HTTP/1.1 200 OK"));
|
||||
assertThat(response,containsString("pathInfo=/R1"));
|
||||
}
|
||||
@ -301,14 +301,14 @@ public class LocalConnectorTest
|
||||
@Test
|
||||
public void testStopStart() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("GET /R1 HTTP/1.0\r\n\r\n");
|
||||
String response=_connector.getResponse("GET /R1 HTTP/1.0\r\n\r\n");
|
||||
assertThat(response,containsString("HTTP/1.1 200 OK"));
|
||||
assertThat(response,containsString("pathInfo=/R1"));
|
||||
|
||||
_server.stop();
|
||||
_server.start();
|
||||
|
||||
response=_connector.getResponses("GET /R2 HTTP/1.0\r\n\r\n");
|
||||
response=_connector.getResponse("GET /R2 HTTP/1.0\r\n\r\n");
|
||||
assertThat(response,containsString("HTTP/1.1 200 OK"));
|
||||
assertThat(response,containsString("pathInfo=/R2"));
|
||||
}
|
||||
@ -316,12 +316,15 @@ public class LocalConnectorTest
|
||||
@Test
|
||||
public void testTwoGETs() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses(
|
||||
LocalEndPoint endp = _connector.connect();
|
||||
endp.addInput(
|
||||
"GET /R1 HTTP/1.1\r\n"+
|
||||
"Host: localhost\r\n"+
|
||||
"\r\n"+
|
||||
"GET /R2 HTTP/1.0\r\n\r\n");
|
||||
|
||||
String response = endp.getResponse() + endp.getResponse();
|
||||
|
||||
assertThat(response,containsString("HTTP/1.1 200 OK"));
|
||||
assertThat(response,containsString("pathInfo=/R1"));
|
||||
|
||||
@ -355,7 +358,8 @@ public class LocalConnectorTest
|
||||
@Test
|
||||
public void testManyGETs() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses(
|
||||
LocalEndPoint endp = _connector.connect();
|
||||
endp.addInput(
|
||||
"GET /R1 HTTP/1.1\r\n"+
|
||||
"Host: localhost\r\n"+
|
||||
"\r\n"+
|
||||
@ -376,7 +380,10 @@ public class LocalConnectorTest
|
||||
"Connection: close\r\n"+
|
||||
"\r\n");
|
||||
|
||||
String r=response;
|
||||
String r="";
|
||||
|
||||
for (String response=endp.getResponse();response!=null;response=endp.getResponse())
|
||||
r+=response;
|
||||
|
||||
for (int i=1;i<=6;i++)
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import org.eclipse.jetty.http.HttpParser;
|
||||
import org.eclipse.jetty.server.handler.ErrorHandler;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.hamcrest.Matchers;
|
||||
@ -67,7 +66,7 @@ public class ProxyConnectionTest
|
||||
@Test
|
||||
public void testSimple() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r\n"+
|
||||
String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
@ -82,7 +81,7 @@ public class ProxyConnectionTest
|
||||
@Test
|
||||
public void testIPv6() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY UNKNOWN eeee:eeee:eeee:eeee:eeee:eeee:eeee:eeee ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\n"+
|
||||
String response=_connector.getResponse("PROXY UNKNOWN eeee:eeee:eeee:eeee:eeee:eeee:eeee:eeee ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
@ -97,43 +96,43 @@ public class ProxyConnectionTest
|
||||
@Test
|
||||
public void testTooLong() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY TOOLONG!!! eeee:eeee:eeee:eeee:0000:0000:0000:0000 ffff:ffff:ffff:ffff:0000:0000:0000:0000 65535 65535\r\n"+
|
||||
String response=_connector.getResponse("PROXY TOOLONG!!! eeee:eeee:eeee:eeee:0000:0000:0000:0000 ffff:ffff:ffff:ffff:0000:0000:0000:0000 65535 65535\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotComplete() throws Exception
|
||||
{
|
||||
_connector.setIdleTimeout(100);
|
||||
String response=_connector.getResponses("PROXY TIMEOUT");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
String response=_connector.getResponse("PROXY TIMEOUT");
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadChar() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY\tTCP 1.2.3.4 5.6.7.8 111 222\r\n"+
|
||||
String response=_connector.getResponse("PROXY\tTCP 1.2.3.4 5.6.7.8 111 222\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadCRLF() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r \n"+
|
||||
String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r \n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -141,35 +140,35 @@ public class ProxyConnectionTest
|
||||
{
|
||||
try(StacklessLogging stackless = new StacklessLogging(ProxyConnectionFactory.class))
|
||||
{
|
||||
String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 9999999999999 222\r\n"+
|
||||
String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 9999999999999 222\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingField() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 222\r\n"+
|
||||
String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 222\r\n"+
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHTTP() throws Exception
|
||||
{
|
||||
String response=_connector.getResponses(
|
||||
String response=_connector.getResponse(
|
||||
"GET /path HTTP/1.1\n"+
|
||||
"Host: server:80\n"+
|
||||
"Connection: close\n"+
|
||||
"\n");
|
||||
Assert.assertThat(response,Matchers.equalTo(""));
|
||||
Assert.assertNull(response);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ public class ContextHandlerCollectionTest
|
||||
handlerF.reset();
|
||||
|
||||
String t = String.format("test %d %s@%s --> %s | %s%n",i,uri,host,connector.getName(),handler);
|
||||
String response = connector.getResponses("GET "+uri+" HTTP/1.0\nHost: "+host+"\n\n");
|
||||
String response = connector.getResponse("GET "+uri+" HTTP/1.0\nHost: "+host+"\n\n");
|
||||
|
||||
if (handler==null)
|
||||
{
|
||||
@ -301,32 +301,32 @@ public class ContextHandlerCollectionTest
|
||||
server.setHandler(contexts);
|
||||
server.start();
|
||||
|
||||
String response=connector.getResponses("GET / HTTP/1.0\r\n\r\n");
|
||||
String response=connector.getResponse("GET / HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("root"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /foobar/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /foobar/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("root"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /left/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /left/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("left"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /leftcentre/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /leftcentre/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("left of centre"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /rightcentre/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /rightcentre/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("right of centre"));
|
||||
assertThat(response, containsString("Wrapped: TRUE"));
|
||||
|
||||
response=connector.getResponses("GET /right/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /right/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("right"));
|
||||
assertThat(response, containsString("Wrapped: TRUE"));
|
||||
@ -362,32 +362,32 @@ public class ContextHandlerCollectionTest
|
||||
server.setHandler(contexts);
|
||||
server.start();
|
||||
|
||||
String response=connector.getResponses("GET / HTTP/1.0\r\n\r\n");
|
||||
String response=connector.getResponse("GET / HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("root"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /foobar/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /foobar/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("root"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /left/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /left/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("left"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /leftcentre/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /leftcentre/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("left of centre"));
|
||||
assertThat(response, not(containsString("Wrapped: TRUE")));
|
||||
|
||||
response=connector.getResponses("GET /rightcentre/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /rightcentre/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("right of centre"));
|
||||
assertThat(response, containsString("Wrapped: ASYNC"));
|
||||
|
||||
response=connector.getResponses("GET /right/info HTTP/1.0\r\n\r\n");
|
||||
response=connector.getResponse("GET /right/info HTTP/1.0\r\n\r\n");
|
||||
assertThat(response, startsWith("HTTP/1.1 200 OK"));
|
||||
assertThat(response, endsWith("right"));
|
||||
assertThat(response, containsString("Wrapped: ASYNC"));
|
||||
|
@ -90,7 +90,7 @@ public class ContextHandlerTest
|
||||
try
|
||||
{
|
||||
server.start();
|
||||
connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
|
||||
Assert.assertTrue(handlerA.isHandled());
|
||||
Assert.assertFalse(handlerB.isHandled());
|
||||
@ -100,7 +100,7 @@ public class ContextHandlerTest
|
||||
handlerB.reset();
|
||||
handlerC.reset();
|
||||
|
||||
connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example2.com\n\n");
|
||||
connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example2.com\n\n");
|
||||
|
||||
Assert.assertFalse(handlerA.isHandled());
|
||||
Assert.assertTrue(handlerB.isHandled());
|
||||
@ -147,7 +147,7 @@ public class ContextHandlerTest
|
||||
server.start();
|
||||
try
|
||||
{
|
||||
connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
Assert.assertTrue(handlerA.isHandled());
|
||||
Assert.assertFalse(handlerB.isHandled());
|
||||
Assert.assertFalse(handlerC.isHandled());
|
||||
@ -155,7 +155,7 @@ public class ContextHandlerTest
|
||||
handlerB.reset();
|
||||
handlerC.reset();
|
||||
|
||||
connector.getResponses("GET / HTTP/1.0\n" + "Host: localhost\n\n");
|
||||
connector.getResponse("GET / HTTP/1.0\n" + "Host: localhost\n\n");
|
||||
Assert.assertFalse(handlerA.isHandled());
|
||||
Assert.assertFalse(handlerB.isHandled());
|
||||
Assert.assertTrue(handlerC.isHandled());
|
||||
@ -163,7 +163,7 @@ public class ContextHandlerTest
|
||||
handlerB.reset();
|
||||
handlerC.reset();
|
||||
|
||||
connectorN.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
connectorN.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n");
|
||||
Assert.assertTrue(handlerA.isHandled());
|
||||
Assert.assertFalse(handlerB.isHandled());
|
||||
Assert.assertFalse(handlerC.isHandled());
|
||||
@ -171,7 +171,7 @@ public class ContextHandlerTest
|
||||
handlerB.reset();
|
||||
handlerC.reset();
|
||||
|
||||
connectorN.getResponses("GET / HTTP/1.0\n" + "Host: localhost\n\n");
|
||||
connectorN.getResponse("GET / HTTP/1.0\n" + "Host: localhost\n\n");
|
||||
Assert.assertFalse(handlerA.isHandled());
|
||||
Assert.assertTrue(handlerB.isHandled());
|
||||
Assert.assertFalse(handlerC.isHandled());
|
||||
@ -237,39 +237,39 @@ public class ContextHandlerTest
|
||||
|
||||
// check that all contexts start normally
|
||||
server.start();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'"));
|
||||
|
||||
// If we stop foobar, then requests will be handled by foo
|
||||
foobar.stop();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
|
||||
// If we shutdown foo then requests will be 503'd
|
||||
foo.shutdown().get();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("503"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("503"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("503"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("503"));
|
||||
|
||||
// If we stop foo then requests will be handled by root
|
||||
foo.stop();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
|
||||
// If we start foo then foobar requests will be handled by foo
|
||||
foo.start();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
|
||||
// If we start foobar then foobar requests will be handled by foobar
|
||||
foobar.start();
|
||||
Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'"));
|
||||
Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'"));
|
||||
Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.4.6-SNAPSHOT</version>
|
||||
<version>9.4.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
|
@ -76,7 +76,7 @@ public class AsyncContextDispatchWithQueryStrings
|
||||
"Host: localhost\r\n" +
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
||||
"Connection: close\r\n" + "\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
assertThat(responseString,startsWith("HTTP/1.1 200"));
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class AsyncContextTest
|
||||
"Host: localhost\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
assertThat(responseString, startsWith("HTTP/1.1 200 "));
|
||||
assertThat(responseString, containsString("doGet:getServletPath:/servletPath"));
|
||||
@ -131,7 +131,7 @@ public class AsyncContextTest
|
||||
"Host: localhost\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request,10,TimeUnit.MINUTES);
|
||||
String responseString = _connector.getResponse(request,10,TimeUnit.MINUTES);
|
||||
|
||||
assertThat(responseString, startsWith("HTTP/1.1 500 "));
|
||||
assertThat(responseString, containsString("ERROR: /error"));
|
||||
@ -147,7 +147,7 @@ public class AsyncContextTest
|
||||
"Host: localhost\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
assertThat(responseString, startsWith("HTTP/1.1 500 "));
|
||||
assertThat(responseString, containsString("ERROR: /error"));
|
||||
@ -163,7 +163,7 @@ public class AsyncContextTest
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = new BufferedReader(new StringReader(responseString));
|
||||
|
||||
@ -184,7 +184,7 @@ public class AsyncContextTest
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = new BufferedReader(new StringReader(responseString));
|
||||
|
||||
@ -200,7 +200,7 @@ public class AsyncContextTest
|
||||
{
|
||||
String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||
+ "Connection: close\r\n" + "\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = parseHeader(responseString);
|
||||
|
||||
@ -218,7 +218,7 @@ public class AsyncContextTest
|
||||
{
|
||||
String request = "GET /ctx/path%20with%20spaces/servletPath?dispatch=true&queryStringWithEncoding=space%20space HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||
+ "Connection: close\r\n" + "\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = parseHeader(responseString);
|
||||
|
||||
@ -237,7 +237,7 @@ public class AsyncContextTest
|
||||
String request = "GET /ctx/servletPath HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||
+ "Connection: close\r\n" + "\r\n";
|
||||
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = parseHeader(responseString);
|
||||
|
||||
@ -252,7 +252,7 @@ public class AsyncContextTest
|
||||
String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n"
|
||||
+ "Connection: close\r\n" + "\r\n";
|
||||
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = parseHeader(responseString);
|
||||
|
||||
@ -290,7 +290,7 @@ public class AsyncContextTest
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = parseHeader(responseString);
|
||||
|
||||
@ -369,7 +369,7 @@ public class AsyncContextTest
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = new BufferedReader(new StringReader(responseString));
|
||||
|
||||
@ -386,7 +386,7 @@ public class AsyncContextTest
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n" +
|
||||
"Connection: close\r\n" +
|
||||
"\r\n";
|
||||
String responseString = _connector.getResponses(request);
|
||||
String responseString = _connector.getResponse(request);
|
||||
|
||||
BufferedReader br = new BufferedReader(new StringReader(responseString));
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class ComplianceViolations2616Test
|
||||
req1.append("Connection: close\r\n");
|
||||
req1.append("\r\n");
|
||||
|
||||
String response = connector.getResponses(req1.toString());
|
||||
String response = connector.getResponse(req1.toString());
|
||||
assertThat("Response status", response, containsString("HTTP/1.1 200 OK"));
|
||||
assertThat("Response headers", response, containsString("X-Http-Violation-0: RFC2616<RFC7230: name only header"));
|
||||
|
||||
@ -163,7 +163,7 @@ public class ComplianceViolations2616Test
|
||||
req1.append("Name\r\n");
|
||||
req1.append("\r\n");
|
||||
|
||||
String response = connector.getResponses(req1.toString());
|
||||
String response = connector.getResponse(req1.toString());
|
||||
assertThat("Response status", response, containsString("HTTP/1.1 200"));
|
||||
assertThat("Response headers", response, containsString("X-Http-Violation-0: RFC2616<RFC7230: name only header"));
|
||||
|
||||
@ -182,7 +182,7 @@ public class ComplianceViolations2616Test
|
||||
req1.append("Accept: */*\r\n");
|
||||
req1.append("\r\n");
|
||||
|
||||
String response = connector.getResponses(req1.toString());
|
||||
String response = connector.getResponse(req1.toString());
|
||||
assertThat("Response status", response, containsString("HTTP/1.1 200"));
|
||||
assertThat("Response headers", response, containsString("X-Http-Violation-0: RFC2616<RFC7230: header folding"));
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user