Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge of the actual 3.1 into the 4.0 #5719

Merged
merged 51 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
789a7e2
3.0.14
jersey-bot May 23, 2024
5864f89
3.0.99-SNAPSHOT
jersey-bot May 23, 2024
be07aef
Technical merge of released branch 3.0.14-BRANCH
senivam May 23, 2024
2ee39d5
update Jackson to 2.17.1
senivam May 28, 2024
d8f3e0f
prevent calling ServletRequest#getInputStream if FILTER_FORWARD_ON_404
jansupol Jun 3, 2024
7d69a42
Support missing Content-Length header
jansupol Jun 6, 2024
e24eb6d
More release checks
jansupol May 27, 2024
04857d7
mvn build improvements (#5666)
senivam Jun 18, 2024
ed233c5
Prevent blowing connections number for reoccurring SSLContextFatories…
jansupol Jun 18, 2024
15c7009
ResponseWriter#writeResponseStatusAndHeaders drops some redundant code
rw7 Jun 24, 2024
51869ec
Do not point to a SNAPSHOT Jersey in version-agnostic tests
jansupol Jun 27, 2024
a31c9ae
PathProvider supports Path entities, in preparation for future defaul…
mkarg Jun 8, 2024
c97f944
Last-Modified header is garbled when accessing wadl document on Japan…
vavishal Jul 16, 2024
6380dc5
Prevent NPE in micrometer when there is no response & 404
jansupol Jul 3, 2024
80951a4
Backport a fix from micrometer repo for this
jansupol Jul 4, 2024
8174fed
Support Multipart with Buffered Entity and Netty Connector
jansupol Jul 3, 2024
6fcec23
Wrap call of deprecated HttpServletResponse#setStatus into try catch
jansupol Jul 2, 2024
c4adbb3
Better explanation of missing jersey-hk2 module consequences.
jansupol Jun 28, 2024
7528da9
Merge remote-tracking branch 'origin/2.x' into 'origin/3.0'
senivam Jul 17, 2024
bbeaa55
After-merge
senivam Jul 17, 2024
de04f51
merge of the actual 2.x into the 3.0
senivam Jul 23, 2024
2ece961
Merge remote-tracking branch 'origin/3.0' into 'origin/3.1'
senivam Jul 23, 2024
991e08b
Post merge
senivam Jul 23, 2024
7662beb
merge of the actual 3.0 into the 3.1
senivam Jul 24, 2024
503195b
Add Path provider automatically to the list of providers
jansupol Jul 23, 2024
ff92b7e
Allow ChunkedInput#close to close the underlying stream
jansupol Jul 24, 2024
876c83d
Propagate WebApplicationException from SseEventSource to provided err…
jansupol Jul 25, 2024
61c7ae5
Fix intermittent failure in BroadcasterExecutorTest
jansupol Jul 25, 2024
6aa373f
2.44
jersey-bot Jul 29, 2024
cd19f99
2.45-SNAPSHOT
jersey-bot Jul 29, 2024
0b00250
Merge remote-tracking branch 'origin/2.x' into 'origin/3.0'
senivam Jul 30, 2024
32edfbb
Merge of the actual 2.x into the 3.0
senivam Jul 30, 2024
a85c4d2
Technical merge of released branch 2.44-BRANCH
senivam Jul 31, 2024
982e6db
MultiRelease jar fix
senivam Jul 31, 2024
3c8b050
3.0.15
jersey-bot Jul 31, 2024
49d86af
3.0.99-SNAPSHOT
jersey-bot Jul 31, 2024
ad5df8e
Merge remote-tracking branch 'origin/3.0' into 'origin/3.1'
senivam Jul 31, 2024
4de62ad
merge of the actual 3.0 into the 3.1
senivam Aug 1, 2024
0f4fd33
Technical merge of released branch 3.0.15-BRANCH
senivam Aug 1, 2024
0a207bd
Merge remote-tracking branch 'origin/2.x' into 'origin/3.0'
senivam Aug 1, 2024
2d7b11f
Release a reference to threadlocal on shutdown
jansupol Aug 1, 2024
d696db7
Merge remote-tracking branch 'origin/2.x' into 'origin/3.0'
senivam Aug 1, 2024
4ff7b9f
after-release merge of the 2.x into the 3.0
senivam Aug 2, 2024
845ab16
Merge remote-tracking branch 'origin/3.0' into 'origin/3.1'
senivam Aug 2, 2024
a183023
merge of the actual 3.0 into the 3.1
senivam Aug 2, 2024
4649c2b
3.1.8
jersey-bot Aug 2, 2024
ab68bdb
3.1.99-SNAPSHOT
jersey-bot Aug 2, 2024
e061403
Technical merge of released branch 3.1.8-BRANCH
senivam Aug 5, 2024
f5edd21
Merge 'origin/3.1' into 'origin/4.0'
senivam Aug 6, 2024
6cf8c61
Merge remote-tracking branch 'origin/3.1' into 'origin/4.0'
senivam Aug 6, 2024
11c18bf
Post mnerge
senivam Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Javassist Version 3.30.2-GA
* Project: http://www.javassist.org/
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.

Jackson JAX-RS Providers Version 2.17.0
Jackson JAX-RS Providers Version 2.17.1
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2024 FasterXML, LLC. All rights reserved unless otherwise indicated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2015, 2024 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 @@ -127,6 +127,5 @@
<properties>
<java.version>17</java.version>
<jersey.config.test.container.port>8080</jersey.config.test.container.port>
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion archetypes/jersey-heroku-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<version>${resources.mvn.plugin.version}</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
<configuration>
<source>11</source>
Expand Down Expand Up @@ -117,9 +117,6 @@

<properties>
<jersey.version>${project.version}</jersey.version>
<jetty.plugin.version>12.0.8</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<surefire.mvn.plugin.version>3.2.5</surefire.mvn.plugin.version>
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion archetypes/jersey-quickstart-grizzly2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<version>${resources.mvn.plugin.version}</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2024 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
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<archetype-descriptor
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="jersey-quickstart-webapp"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<!--<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/webapp</directory>
</fileSet>-->
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>\${junit-jupiter.version}</version>
<version>\${junit5.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -50,7 +50,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
Expand All @@ -60,7 +60,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<version>${exec.mvn.plugin.version}</version>
<executions>
<execution>
<goals>
Expand All @@ -83,8 +83,7 @@

<properties>
<jersey.version>${project.version}</jersey.version>
<junit-jupiter.version>5.10.2</junit-jupiter.version>
<junit5.version>${junit5.version}</junit5.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<surefire.mvn.plugin.version>3.2.5</surefire.mvn.plugin.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion archetypes/jersey-quickstart-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<version>${resources.mvn.plugin.version}</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2024 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
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<archetype-descriptor
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="jersey-quickstart-webapp"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/webapp</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
Expand Down Expand Up @@ -63,6 +63,5 @@
<properties>
<jersey.version>${project.version}</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion bundles/jaxrs-ri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<version>2.0.2</version>
<inherited>false</inherited>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
import org.glassfish.jersey.client.innate.http.SSLParamConfigurator;
import org.glassfish.jersey.client.spi.AsyncConnectorCallback;
import org.glassfish.jersey.client.spi.Connector;
import org.glassfish.jersey.innate.io.InputStreamWrapper;
import org.glassfish.jersey.internal.util.PropertiesHelper;
import org.glassfish.jersey.message.internal.HeaderUtils;
import org.glassfish.jersey.message.internal.OutboundMessageContext;
Expand Down Expand Up @@ -521,7 +522,7 @@ public ClientResponse apply(final ClientRequest clientRequest) throws Processing
final HttpEntity entity = response.getEntity();

if (entity != null) {
if (headers.get(HttpHeaders.CONTENT_LENGTH) == null) {
if (headers.get(HttpHeaders.CONTENT_LENGTH) == null && entity.getContentLength() >= 0) {
headers.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(entity.getContentLength()));
}

Expand Down Expand Up @@ -895,7 +896,7 @@ protected void prepareSocket(SSLSocket socket) throws IOException {
}
}

private static class CancellableInputStream extends InputStream {
private static class CancellableInputStream extends InputStreamWrapper {
private final InputStream in;
private final Supplier<Boolean> isCancelled;

Expand All @@ -904,58 +905,17 @@ private CancellableInputStream(InputStream in, Supplier<Boolean> isCancelled) {
this.isCancelled = isCancelled;
}

public int read(byte b[]) throws IOException {
checkAborted();
return in.read();
}

public int read(byte b[], int off, int len) throws IOException {
checkAborted();
return in.read(b, off, len);
}

@Override
public int read() throws IOException {
checkAborted();
return in.read();
}

public boolean markSupported() {
return in.markSupported();
}

@Override
public long skip(long n) throws IOException {
checkAborted();
return in.skip(n);
}

@Override
public int available() throws IOException {
checkAborted();
return in.available();
}

@Override
public void close() throws IOException {
in.close();
protected InputStream getWrapped() {
return in;
}

@Override
public void mark(int readlimit) {
in.mark(readlimit);
}

@Override
public void reset() throws IOException {
checkAborted();
in.reset();
}

private void checkAborted() throws IOException {
protected InputStream getWrappedIOE() throws IOException {
if (isCancelled.get()) {
throw new IOException(new CancellationException());
}
return in;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,15 @@ private void decideTransferEncoding() throws ParseException {
}

return;
} else if (httpResponse.getHasContent()) {
// missing Content-Length
transferEncodingParser = TransferEncodingParser
.createFixedLengthParser(httpResponse.getBodyStream(), Long.MAX_VALUE);
return;
}



// TODO what now? Expect no content or fail loudly?
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ boolean parse(ByteBuffer input) throws ParseException {
responseBody.notifyDataAvailable(parsed);
consumedLength += data.length;

return consumedLength == expectedLength;
return consumedLength == expectedLength || expectedLength == Long.MAX_VALUE /* unknown at the beginning */;
}
}

Expand Down
Loading