mirror of https://github.com/apache/jclouds.git
Issue 527:update to official build of jetty
This commit is contained in:
parent
35412b828c
commit
95310ba680
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.compute;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
|
|
@ -98,8 +98,8 @@
|
|||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.http;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
@ -29,9 +28,9 @@ import java.util.concurrent.ExecutionException;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jetty.server.Request;
|
||||
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
|
||||
import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
|
||||
import org.mortbay.jetty.Request;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.inject.Module;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.http;
|
||||
|
||||
import static com.google.common.base.Throwables.propagate;
|
||||
|
@ -46,6 +45,12 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.server.Handler;
|
||||
import org.eclipse.jetty.server.Request;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.server.ssl.SslSocketConnector;
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.crypto.CryptoStreams;
|
||||
import org.jclouds.io.InputSuppliers;
|
||||
|
@ -53,12 +58,6 @@ import org.jclouds.rest.RestContext;
|
|||
import org.jclouds.rest.RestContextBuilder;
|
||||
import org.jclouds.rest.RestContextSpec;
|
||||
import org.jclouds.util.Strings2;
|
||||
import org.mortbay.jetty.Connector;
|
||||
import org.mortbay.jetty.Handler;
|
||||
import org.mortbay.jetty.Request;
|
||||
import org.mortbay.jetty.Server;
|
||||
import org.mortbay.jetty.handler.AbstractHandler;
|
||||
import org.mortbay.jetty.ssl.SslSocketConnector;
|
||||
import org.testng.annotations.AfterTest;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Optional;
|
||||
|
@ -96,7 +95,7 @@ public abstract class BaseJettyTest {
|
|||
md5 = CryptoStreams.md5Base64(oneHundredOneConstitutions);
|
||||
|
||||
Handler server1Handler = new AbstractHandler() {
|
||||
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch)
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
if (failIfNoContentLength(request, response)) {
|
||||
return;
|
||||
|
@ -207,7 +206,7 @@ public abstract class BaseJettyTest {
|
|||
|
||||
protected void setupAndStartSSLServer(final int testPort) throws Exception {
|
||||
Handler server2Handler = new AbstractHandler() {
|
||||
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch)
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
if (request.getMethod().equals("PUT")) {
|
||||
if (request.getContentLength() > 0) {
|
||||
|
@ -293,7 +292,7 @@ public abstract class BaseJettyTest {
|
|||
*/
|
||||
protected boolean failEveryTenRequests(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
if (cycle.incrementAndGet() % 10 == 0) {
|
||||
response.sendError(500);
|
||||
response.sendError(500, "unlucky 10");
|
||||
((Request) request).setHandled(true);
|
||||
return true;
|
||||
}
|
||||
|
@ -325,7 +324,7 @@ public abstract class BaseJettyTest {
|
|||
if (realHeaders.get(CONTENT_LENGTH) == null) {
|
||||
response.getWriter().println("no content length!");
|
||||
response.getWriter().println(realHeaders.toString());
|
||||
response.sendError(500);
|
||||
response.sendError(500, "no content length!");
|
||||
((Request) request).setHandled(true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.http.functions;
|
||||
|
||||
import static org.easymock.EasyMock.expect;
|
||||
|
@ -33,11 +32,11 @@ import java.util.concurrent.TimeoutException;
|
|||
import javax.inject.Provider;
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
|
||||
import org.eclipse.jetty.http.HttpHeaders;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.jclouds.util.Strings2;
|
||||
import org.mortbay.jetty.HttpHeaders;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,13 +16,12 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.rest;
|
||||
|
||||
import static com.google.common.base.Throwables.propagate;
|
||||
import static org.easymock.classextension.EasyMock.createMock;
|
||||
import static org.jclouds.http.HttpUtils.sortAndConcatHeadersIntoString;
|
||||
import static org.mortbay.jetty.HttpHeaders.TRANSFER_ENCODING;
|
||||
import static org.eclipse.jetty.http.HttpHeaders.TRANSFER_ENCODING;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNull;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.rest.internal;
|
||||
|
||||
import static com.google.common.base.Charsets.UTF_8;
|
||||
|
@ -77,6 +76,7 @@ import javax.ws.rs.core.MediaType;
|
|||
import javax.ws.rs.core.UriBuilder;
|
||||
|
||||
import org.easymock.IArgumentMatcher;
|
||||
import org.eclipse.jetty.http.HttpHeaders;
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.crypto.Crypto;
|
||||
import org.jclouds.date.DateService;
|
||||
|
@ -138,7 +138,6 @@ import org.jclouds.rest.binders.BindToJsonPayload;
|
|||
import org.jclouds.rest.binders.BindToStringPayload;
|
||||
import org.jclouds.rest.config.RestClientModule;
|
||||
import org.jclouds.util.Strings2;
|
||||
import org.mortbay.jetty.HttpHeaders;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -193,9 +193,9 @@
|
|||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<version>7.0.0.pre5</version>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<version>7.4.0.RC0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
|
@ -208,7 +208,7 @@
|
|||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>5.14.10</version>
|
||||
<version>6.0.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<version>1.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-ssl</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-security</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
Loading…
Reference in New Issue