Skip to content

Commit

Permalink
Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbordet committed Dec 17, 2019
2 parents 5e558a5 + 129a51c commit b1e2f80
Show file tree
Hide file tree
Showing 28 changed files with 1,432 additions and 501 deletions.
130 changes: 57 additions & 73 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,114 +1,98 @@
==============================================================
Jetty Web Container
Copyright 1995-2019 Mort Bay Consulting Pty Ltd.
==============================================================
Notices for Eclipse Jetty
=========================
This content is produced and maintained by the Eclipse Jetty project.

The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
unless otherwise noted.
Project home: https://www.eclipse.org/jetty/

Jetty is dual licensed under both
Trademarks
----------
Eclipse Jetty, and Jetty are trademarks of the Eclipse Foundation.

* The Apache 2.0 License
http://www.apache.org/licenses/LICENSE-2.0.html
Copyright
---------
All contributions are the property of the respective authors or of
entities to which copyright has been assigned by the authors (eg. employer).

and
Declared Project Licenses
-------------------------
This artifacts of this project are made available under the terms of:

* The Eclipse Public 1.0 License
* the Eclipse Public License v. 1.0
http://www.eclipse.org/legal/epl-v10.html
SPDX-License-Identifier: EPL-1.0

Jetty may be distributed under either license.
or

------
Eclipse
* the Apache License, Version 2.0
https://www.apache.org/licenses/LICENSE-2.0.
SPDX-License-Identifier: Apache-2.0

The following artifacts are EPL.
The following dependencies are EPL.
* org.eclipse.jetty.orbit:org.eclipse.jdt.core

The following artifacts are EPL and ASL2.
The following dependencies are EPL and ASL2.
* org.eclipse.jetty.orbit:javax.security.auth.message


The following artifacts are EPL and CDDL 1.0.
The following dependencies are EPL and CDDL 1.0.
* org.eclipse.jetty.orbit:javax.mail.glassfish


------
Oracle

The following artifacts are CDDL + GPLv2 with classpath exception.
The following dependencies are CDDL + GPLv2 with classpath exception.
https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html

* javax.servlet:javax.servlet-api
* javax.annotation:javax.annotation-api
* javax.transaction:javax.transaction-api
* javax.websocket:javax.websocket-api

------
Oracle OpenJDK

If ALPN is used to negotiate HTTP/2 connections, then the following
artifacts may be included in the distribution or downloaded when ALPN
module is selected.

* java.sun.security.ssl

These artifacts replace/modify OpenJDK classes. The modififications
are hosted at github and both modified and original are under GPL v2 with
classpath exceptions.
distribution may be included in the distribution or downloaded when ALPN
module is selected. These artifacts replace/modify OpenJDK classes.
The modifications are hosted at github and both modified and original
are under GPL v2 with classpath exceptions.
http://openjdk.java.net/legal/gplv2+ce.html

* java.sun.security.ssl

------
OW2

The following artifacts are licensed by the OW2 Foundation according to the
The following dependencies are licensed by the OW2 Foundation according to the
terms of http://asm.ow2.org/license.html

org.ow2.asm:asm-commons
org.ow2.asm:asm


------
Apache

The following artifacts are ASL2 licensed.

org.apache.taglibs:taglibs-standard-spec
org.apache.taglibs:taglibs-standard-impl
* org.ow2.asm:asm-commons
* org.ow2.asm:asm

The following dependencies are ASL2 licensed.

------
MortBay
* org.apache.taglibs:taglibs-standard-spec
* org.apache.taglibs:taglibs-standard-impl

The following artifacts are ASL2 licensed. Based on selected classes from
The following dependencies are ASL2 licensed. Based on selected classes from
following Apache Tomcat jars, all ASL2 licensed.

org.mortbay.jasper:apache-jsp
org.apache.tomcat:tomcat-jasper
org.apache.tomcat:tomcat-juli
org.apache.tomcat:tomcat-jsp-api
org.apache.tomcat:tomcat-el-api
org.apache.tomcat:tomcat-jasper-el
org.apache.tomcat:tomcat-api
org.apache.tomcat:tomcat-util-scan
org.apache.tomcat:tomcat-util

org.mortbay.jasper:apache-el
org.apache.tomcat:tomcat-jasper-el
org.apache.tomcat:tomcat-el-api


------
Mortbay
* org.mortbay.jasper:apache-jsp
* org.apache.tomcat:tomcat-jasper
* org.apache.tomcat:tomcat-juli
* org.apache.tomcat:tomcat-jsp-api
* org.apache.tomcat:tomcat-el-api
* org.apache.tomcat:tomcat-jasper-el
* org.apache.tomcat:tomcat-api
* org.apache.tomcat:tomcat-util-scan
* org.apache.tomcat:tomcat-util
* org.mortbay.jasper:apache-el
* org.apache.tomcat:tomcat-jasper-el
* org.apache.tomcat:tomcat-el-api

The following artifacts are CDDL + GPLv2 with classpath exception.

https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html

org.eclipse.jetty.toolchain:jetty-servlet-api
* org.eclipse.jetty.toolchain:jetty-schemas

------
Assorted
Cryptography
------------
Content may contain encryption software. The country in which you are currently
may have restrictions on the import, possession, and use, and/or re-export to
another country, of encryption software. BEFORE using any encryption software,
please check the country's laws, regulations and policies concerning the import,
possession, or use, and re-export of encryption software, to see if this is
permitted.

The UnixCrypt.java code implements the one way cryptography used by
Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public class DuplexHttpDestination extends HttpDestination
{
public DuplexHttpDestination(HttpClient client, Origin origin)
{
this(client, new Key(origin, null));
}

public DuplexHttpDestination(HttpClient client, Key key)
{
super(client, key);
super(client, origin);
}
}
24 changes: 12 additions & 12 deletions jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class HttpClient extends ContainerLifeCycle
public static final String USER_AGENT = "Jetty/" + Jetty.VERSION;
private static final Logger LOG = Log.getLogger(HttpClient.class);

private final ConcurrentMap<HttpDestination.Key, HttpDestination> destinations = new ConcurrentHashMap<>();
private final ConcurrentMap<Origin, HttpDestination> destinations = new ConcurrentHashMap<>();
private final ProtocolHandlers handlers = new ProtocolHandlers();
private final List<Request.Listener> requestListeners = new ArrayList<>();
private final Set<ContentDecoder.Factory> decoderFactories = new ContentDecoderFactorySet();
Expand Down Expand Up @@ -499,33 +499,33 @@ private URI checkHost(URI uri)

public Destination resolveDestination(Request request)
{
Origin origin = createOrigin(request.getScheme(), request.getHost(), request.getPort());
HttpClientTransport transport = getTransport();
HttpDestination.Key destinationKey = transport.newDestinationKey((HttpRequest)request, origin);
HttpDestination destination = resolveDestination(destinationKey);
Origin origin = transport.newOrigin((HttpRequest)request);
HttpDestination destination = resolveDestination(origin);
if (LOG.isDebugEnabled())
LOG.debug("Resolved {} for {}", destination, request);
return destination;
}

private Origin createOrigin(String scheme, String host, int port)
public Origin createOrigin(HttpRequest request, Origin.Protocol protocol)
{
String scheme = request.getScheme();
if (!HttpScheme.HTTP.is(scheme) && !HttpScheme.HTTPS.is(scheme) &&
!HttpScheme.WS.is(scheme) && !HttpScheme.WSS.is(scheme))
throw new IllegalArgumentException("Invalid protocol " + scheme);

scheme = scheme.toLowerCase(Locale.ENGLISH);
String host = request.getHost();
host = host.toLowerCase(Locale.ENGLISH);
int port = request.getPort();
port = normalizePort(scheme, port);

return new Origin(scheme, host, port);
return new Origin(scheme, host, port, request.getTag(), protocol);
}

HttpDestination resolveDestination(HttpDestination.Key key)
HttpDestination resolveDestination(Origin origin)
{
return destinations.computeIfAbsent(key, k ->
return destinations.computeIfAbsent(origin, o ->
{
HttpDestination destination = getTransport().newHttpDestination(k);
HttpDestination destination = getTransport().newHttpDestination(o);
// Start the destination before it's published to other threads.
addManaged(destination);
if (LOG.isDebugEnabled())
Expand All @@ -537,7 +537,7 @@ HttpDestination resolveDestination(HttpDestination.Key key)
protected boolean removeDestination(HttpDestination destination)
{
removeBean(destination);
return destinations.remove(destination.getKey(), destination);
return destinations.remove(destination.getOrigin(), destination);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,23 @@ public interface HttpClientTransport extends ClientConnectionFactory
public void setHttpClient(HttpClient client);

/**
* Creates a new Key with the given request and origin.
* Creates a new Origin with the given request.
*
* @param request the request that triggers the creation of the Key
* @param origin the origin of the server for the request
* @return a Key that identifies a destination
* @param request the request that triggers the creation of the Origin
* @return an Origin that identifies a destination
*/
public HttpDestination.Key newDestinationKey(HttpRequest request, Origin origin);
public Origin newOrigin(HttpRequest request);

/**
* Creates a new, transport-specific, {@link HttpDestination} object.
* <p>
* {@link HttpDestination} controls the destination-connection cardinality: protocols like
* HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality.
*
* @param key the destination key
* @param origin the destination origin
* @return a new, transport-specific, {@link HttpDestination} object
*/
public HttpDestination newHttpDestination(HttpDestination.Key key);
public HttpDestination newHttpDestination(Origin origin);

/**
* Establishes a physical connection to the given {@code address}.
Expand Down
Loading

0 comments on commit b1e2f80

Please sign in to comment.