Skip to content

Commit

Permalink
Merge 'MSTR/master' into 2.0.x
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed Nov 22, 2023
2 parents e828733 + ca36bf1 commit 512f43c
Show file tree
Hide file tree
Showing 31 changed files with 1,504 additions and 76 deletions.
44 changes: 6 additions & 38 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,53 +33,21 @@ The project maintains the following source code repositories:
* https://github.com/eclipse-ee4j/tyrus

## Third-party Content
This project leverages the following third party content:

This project leverages the following third party content.

atinject (Package jakarta.inject) (1.0)

jakarta.enterprise.cdi-api Version 3.0.0
* License: Apache License, 2.0
* Copyright 2010, Red Hat, Inc., and individual contributors

cdi-api (2.0.2)

jakarta.inject Version 2.0.0
* License: Apache License, 2.0
* Copyright (C) 2009 The JSR-330 Expert Group

Google Guava (18.0)

* License: Apache License, 2.0

hamcrest-core (1.1)

* License: BSD-3-Clause
* Project: http://hamcrest.org/JavaHamcrest/
* Source:
https://github.com/hamcrest/JavaHamcrest/releases/tag/hamcrest-java-1.1

javassist (3.18)

* License: (MPL-1.1 OR LGPL-2.1-or-later OR Apache-2.0)
* Project: http://jboss-javassist.github.io/javassist/
* Source:
https://github.com/jboss-javassist/javassist/releases/tag/rel_3_18_1_ga


javax.validation:validation-api:jar:1.1.0.Final (1.1.0)

* License: Apache-2.0

jline (2.14.5)

jline Version: 2.14.5
* License: BSD-3-Clause
* Project: https://github.com/jline/jline2
* Source: https://github.com/jline/jline2

junit (4.13.2)

* License: Common Public License 1.0

org.osgi.core (4.2.0)

* License: Apache-2.0

## Cryptography

Expand Down
4 changes: 2 additions & 2 deletions archetypes/echo/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -35,7 +35,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.3.1</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<version>${maven.war.plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin}</version>
<inherited>true</inherited>
<configuration>
<source>${java.version}</source>
Expand Down Expand Up @@ -64,5 +65,7 @@
<java.version>1.8</java.version>
<tyrus.version>${project.version}</tyrus.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.plugin>3.11.0</maven.compiler.plugin>
<maven.war.plugin.version>3.4.0</maven.war.plugin.version>
</properties>
</project>
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -24,7 +24,7 @@
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
<version>1.0.7</version>
<version>1.0.9</version>
</parent>

<groupId>org.glassfish.tyrus</groupId>
Expand Down
1 change: 1 addition & 0 deletions bundles/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/examples-assembly.xml</descriptor>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -295,6 +295,8 @@ public ClientUpgradeInfo processResponse(final UpgradeResponse upgradeResponse,
LocalizationMessages.HANDSHAKE_HTTP_RETRY_AFTER_MESSAGE(), delay));
return UPGRADE_INFO_FAILED;
default:
((ClientEndpointConfig) endpointWrapper.getEndpointConfig()).getConfigurator().afterResponse(upgradeResponse);

clientEngineState = TyrusClientEngineState.FAILED;
HandshakeException e = new HandshakeException(
upgradeResponse.getStatus(),
Expand Down
11 changes: 11 additions & 0 deletions containers/glassfish/cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<version>${inject.api.version}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -193,7 +193,7 @@ public boolean isUserInRole(String role) {
final WebSocketEngine.UpgradeInfo upgradeInfo = engine.upgrade(requestContext, tyrusUpgradeResponse);
switch (upgradeInfo.getStatus()) {
case HANDSHAKE_FAILED:
appendTraceHeaders(httpServletResponse, tyrusUpgradeResponse);
appendAllHeaders(httpServletResponse, tyrusUpgradeResponse);
httpServletResponse.sendError(tyrusUpgradeResponse.getStatus());
break;
case NOT_APPLICABLE:
Expand All @@ -216,9 +216,7 @@ public boolean isUserInRole(String role) {
}

httpServletResponse.setStatus(tyrusUpgradeResponse.getStatus());
for (Map.Entry<String, List<String>> entry : tyrusUpgradeResponse.getHeaders().entrySet()) {
httpServletResponse.addHeader(entry.getKey(), Utils.getHeaderFromList(entry.getValue()));
}
appendAllHeaders(httpServletResponse, tyrusUpgradeResponse);

httpServletResponse.flushBuffer();
LOGGER.fine("Handshake Complete");
Expand Down Expand Up @@ -264,6 +262,13 @@ private static void appendTraceHeaders(HttpServletResponse httpServletResponse,
}
}

private static void appendAllHeaders(HttpServletResponse httpServletResponse, TyrusUpgradeResponse
tyrusUpgradeResponse) {
for (Map.Entry<String, List<String>> entry : tyrusUpgradeResponse.getHeaders().entrySet()) {
httpServletResponse.addHeader(entry.getKey(), Utils.getHeaderFromList(entry.getValue()));
}
}

private synchronized JAXBContext getWsadlJaxbContext() throws JAXBException {
if (wsadlJaxbContext == null) {
wsadlJaxbContext = JAXBContext.newInstance(Application.class.getPackage().getName());
Expand Down
13 changes: 12 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -118,6 +118,17 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>${activation.api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -401,8 +401,21 @@ public Map<String, Object> getProperties() {
}

response.getHeaders().putAll(debugContext.getTracingHeaders());
return new SuccessfulUpgradeInfo(endpointWrapper, protocolHandler, incomingBufferSize, request, response,
extensionContext, debugContext);
switch (response.getStatus()) {
case 101:
case 300:
case 301:
case 302:
case 303:
case 307:
case 308:
case 401:
case 503:
return new SuccessfulUpgradeInfo(endpointWrapper, protocolHandler, incomingBufferSize, request, response,
extensionContext, debugContext);
default:
return new NoConnectionUpgradeInfo(UpgradeStatus.HANDSHAKE_FAILED);
}
}

response.setStatus(500);
Expand Down
4 changes: 2 additions & 2 deletions ext/client-cli/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>2.14.5</version>
<version>${jline.version}</version>
</dependency>
</dependencies>

Expand Down
Loading

0 comments on commit 512f43c

Please sign in to comment.