Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-11-05 18:44:00 -0500
committerGreg Wilkins2015-11-05 18:44:00 -0500
commitfbb680ba7cdb73495524ea9e5b0f49caee7f68d8 (patch)
tree567375d16225048f5de6d3e272cf940d5ee4e85e
parented2550b50f978e1984e19fbda642baf450dbe6a1 (diff)
parent64ea0db9b329d9968a8d7f065ecf908605af05a9 (diff)
downloadorg.eclipse.jetty.project-fbb680ba7cdb73495524ea9e5b0f49caee7f68d8.tar.gz
org.eclipse.jetty.project-fbb680ba7cdb73495524ea9e5b0f49caee7f68d8.tar.xz
org.eclipse.jetty.project-fbb680ba7cdb73495524ea9e5b0f49caee7f68d8.zip
Merge branch 'master' into unix-socketunix-socket
-rw-r--r--jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod8
-rw-r--r--jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod8
-rw-r--r--jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java28
-rw-r--r--jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AsyncMiddleManServlet.java1
-rw-r--r--jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java1
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Request.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java10
-rw-r--r--jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_65.mod8
-rw-r--r--jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_66.mod8
-rw-r--r--pom.xml15
10 files changed, 68 insertions, 23 deletions
diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod
new file mode 100644
index 0000000000..03b32d0774
--- /dev/null
+++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod
@@ -0,0 +1,8 @@
+[name]
+protonego-boot
+
+[files]
+http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.6.v20151105/alpn-boot-8.1.6.v20151105.jar|lib/alpn/alpn-boot-8.1.6.v20151105.jar
+
+[exec]
+-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar
diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod
new file mode 100644
index 0000000000..03b32d0774
--- /dev/null
+++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod
@@ -0,0 +1,8 @@
+[name]
+protonego-boot
+
+[files]
+http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.6.v20151105/alpn-boot-8.1.6.v20151105.jar|lib/alpn/alpn-boot-8.1.6.v20151105.jar
+
+[exec]
+-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar
diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java
index bd2f0cb590..5e872d4f18 100644
--- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java
+++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java
@@ -413,11 +413,11 @@ public abstract class AbstractProxyServlet extends HttpServlet
* like {@link HttpServletResponse#sendError(int)}.</p>
*
* @param clientRequest the client request
- * @param clientResponse the client response
+ * @param proxyResponse the client response
*/
- protected void onProxyRewriteFailed(HttpServletRequest clientRequest, HttpServletResponse clientResponse)
+ protected void onProxyRewriteFailed(HttpServletRequest clientRequest, HttpServletResponse proxyResponse)
{
- clientResponse.setStatus(HttpServletResponse.SC_FORBIDDEN);
+ sendProxyResponseError(clientRequest, proxyResponse, HttpStatus.FORBIDDEN_403);
}
protected boolean hasContent(HttpServletRequest clientRequest)
@@ -549,8 +549,7 @@ public abstract class AbstractProxyServlet extends HttpServlet
int status = failure instanceof TimeoutException ?
HttpStatus.REQUEST_TIMEOUT_408 :
HttpStatus.INTERNAL_SERVER_ERROR_500;
- proxyResponse.setStatus(status);
- clientRequest.getAsyncContext().complete();
+ sendProxyResponseError(clientRequest, proxyResponse, status);
}
}
@@ -636,13 +635,10 @@ public abstract class AbstractProxyServlet extends HttpServlet
else
{
proxyResponse.resetBuffer();
- if (failure instanceof TimeoutException)
- proxyResponse.setStatus(HttpServletResponse.SC_GATEWAY_TIMEOUT);
- else
- proxyResponse.setStatus(HttpServletResponse.SC_BAD_GATEWAY);
- proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString());
- AsyncContext asyncContext = clientRequest.getAsyncContext();
- asyncContext.complete();
+ int status = failure instanceof TimeoutException ?
+ HttpStatus.GATEWAY_TIMEOUT_504 :
+ HttpStatus.BAD_GATEWAY_502;
+ sendProxyResponseError(clientRequest, proxyResponse, status);
}
}
@@ -651,6 +647,14 @@ public abstract class AbstractProxyServlet extends HttpServlet
return System.identityHashCode(clientRequest);
}
+ protected void sendProxyResponseError(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, int status)
+ {
+ proxyResponse.setStatus(status);
+ proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString());
+ if (clientRequest.isAsyncStarted())
+ clientRequest.getAsyncContext().complete();
+ }
+
/**
* <p>Utility class that implement transparent proxy functionalities.</p>
* <p>Configuration parameters:</p>
diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AsyncMiddleManServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AsyncMiddleManServlet.java
index 796da80660..6fbb9d87a9 100644
--- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AsyncMiddleManServlet.java
+++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AsyncMiddleManServlet.java
@@ -138,6 +138,7 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
return new ProxyWriter(clientRequest, proxyResponse);
}
+ @Override
protected Response.CompleteListener newProxyResponseListener(HttpServletRequest clientRequest, HttpServletResponse proxyResponse)
{
return new ProxyResponseListener(clientRequest, proxyResponse);
diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java
index 51c0951284..2c45df510e 100644
--- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java
+++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/ProxyServlet.java
@@ -93,6 +93,7 @@ public class ProxyServlet extends AbstractProxyServlet
return new ProxyInputStreamContentProvider(request, response, proxyRequest, request.getInputStream());
}
+ @Override
protected Response.Listener newProxyResponseListener(HttpServletRequest request, HttpServletResponse response)
{
return new ProxyResponseListener(request, response);
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
index 0401994387..7d78750c2a 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
@@ -40,7 +40,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.concurrent.ConcurrentLinkedQueue;
import javax.servlet.AsyncContext;
import javax.servlet.AsyncListener;
@@ -1752,13 +1751,12 @@ public class Request implements HttpServletRequest
return _savedNewSessions.get(key);
}
-
/* ------------------------------------------------------------ */
/**
* @param request the Request metadata
*/
public void setMetaData(org.eclipse.jetty.http.MetaData.Request request)
- {
+ {
_metadata=request;
_originalURI=_metadata.getURIString();
setMethod(request.getMethod());
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java
index 198e5c4c25..20fc7db1ea 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java
@@ -345,14 +345,12 @@ public class ShutdownMonitor
*/
private ShutdownMonitor()
{
- Properties props = System.getProperties();
-
- this.DEBUG = props.containsKey("DEBUG");
+ this.DEBUG = System.getProperty("DEBUG") != null;
// Use values passed thru via /jetty-start/
- this.host = props.getProperty("STOP.HOST","127.0.0.1");
- this.port = Integer.parseInt(props.getProperty("STOP.PORT","-1"));
- this.key = props.getProperty("STOP.KEY",null);
+ this.host = System.getProperty("STOP.HOST","127.0.0.1");
+ this.port = Integer.parseInt(System.getProperty("STOP.PORT","-1"));
+ this.key = System.getProperty("STOP.KEY",null);
this.exitVm = true;
}
diff --git a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_65.mod b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_65.mod
new file mode 100644
index 0000000000..03b32d0774
--- /dev/null
+++ b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_65.mod
@@ -0,0 +1,8 @@
+[name]
+protonego-boot
+
+[files]
+http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.6.v20151105/alpn-boot-8.1.6.v20151105.jar|lib/alpn/alpn-boot-8.1.6.v20151105.jar
+
+[exec]
+-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar
diff --git a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_66.mod b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_66.mod
new file mode 100644
index 0000000000..03b32d0774
--- /dev/null
+++ b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_66.mod
@@ -0,0 +1,8 @@
+[name]
+protonego-boot
+
+[files]
+http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.6.v20151105/alpn-boot-8.1.6.v20151105.jar|lib/alpn/alpn-boot-8.1.6.v20151105.jar
+
+[exec]
+-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar
diff --git a/pom.xml b/pom.xml
index 1615b451ee..2ff6c258bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -976,7 +976,18 @@
<alpn.version>8.1.5.v20150921</alpn.version>
</properties>
</profile>
-
+ <profile>
+ <id>8u65</id>
+ <activation>
+ <property>
+ <name>java.version</name>
+ <value>1.8.0_65</value>
+ </property>
+ </activation>
+ <properties>
+ <alpn.version>8.1.6.v20151105</alpn.version>
+ </properties>
+ </profile>
<profile>
<id>8u66</id>
<activation>
@@ -986,7 +997,7 @@
</property>
</activation>
<properties>
- <alpn.version>8.1.5.v20150921</alpn.version>
+ <alpn.version>8.1.6.v20151105</alpn.version>
</properties>
</profile>
</profiles>

Back to the top