Skip to content

Commit 77bb3e5

Browse files
authored
revert #5962 and #5806 for TCK compatibility
2 parents 5bdf411 + 0c01ae8 commit 77bb3e5

File tree

21 files changed

+50
-840
lines changed

21 files changed

+50
-840
lines changed

containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletEntityInputStream.java

Lines changed: 0 additions & 109 deletions
This file was deleted.

containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletProperties.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -138,30 +138,6 @@ public final class ServletProperties {
138138
*/
139139
public static final String QUERY_PARAMS_AS_FORM_PARAMS_DISABLED = "jersey.config.servlet.form.queryParams.disabled";
140140

141-
/**
142-
* Indicates if any input stream is expected and shall be waited while using POST method. It can happen that a delay
143-
* appear between the time the request is received and the time the input stream is available. In this case, the
144-
* server will wait for the input stream to be available before processing the request.
145-
*
146-
* @since 3.1.11
147-
*/
148-
public static final String WAIT_FOR_INPUT = "jersey.config.servlet.expect.input";
149-
150-
/**
151-
* Timeout which shall be respected while waiting for the input stream to be available.
152-
* The timeout is in milliseconds.
153-
*
154-
* @since 3.1.11
155-
*/
156-
public static final String WAIT_FOR_INPUT_TIMEOUT = "jersey.config.servlet.input.timeout";
157-
158-
/**
159-
* Default timeout which shall be respected while waiting for the input stream to be available.
160-
*
161-
* @since 3.1.11
162-
*/
163-
public static final Long WAIT_FOR_INPUT_DEFAULT_TIMEOUT = 100L;
164-
165141
/**
166142
* Identifies the object that will be used as a parent {@code HK2 ServiceLocator} in the Jersey
167143
* {@link WebComponent}.

containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.glassfish.jersey.servlet;
1818

1919
import java.io.IOException;
20+
import java.io.InputStream;
2021
import java.io.UncheckedIOException;
2122
import java.lang.reflect.Type;
2223
import java.net.URI;
@@ -56,6 +57,7 @@
5657
import jakarta.servlet.http.HttpServletRequest;
5758
import jakarta.servlet.http.HttpServletResponse;
5859

60+
import org.glassfish.jersey.innate.io.InputStreamWrapper;
5961
import org.glassfish.jersey.internal.ServiceFinderBinder;
6062
import org.glassfish.jersey.internal.inject.AbstractBinder;
6163
import org.glassfish.jersey.internal.inject.InjectionManager;
@@ -423,15 +425,11 @@ private void initContainerRequest(
423425
final ResponseWriter responseWriter) throws IOException {
424426

425427
try {
426-
boolean waitForInputEnable = requestContext.resolveProperty(ServletProperties.WAIT_FOR_INPUT, Boolean.TRUE);
427-
long waitForInputTimeOut = requestContext.resolveProperty(ServletProperties.WAIT_FOR_INPUT_TIMEOUT,
428-
ServletProperties.WAIT_FOR_INPUT_DEFAULT_TIMEOUT);
429-
requestContext.wrapEntityInputStream(new ServletEntityInputStream(waitForInputEnable,
430-
waitForInputTimeOut) {
431-
private ServletInputStream wrappedStream;
428+
requestContext.setEntityStream(new InputStreamWrapper() {
432429

430+
private ServletInputStream wrappedStream;
433431
@Override
434-
protected ServletInputStream getWrappedStream() {
432+
protected InputStream getWrapped() {
435433
if (wrappedStream == null) {
436434
try {
437435
wrappedStream = servletRequest.getInputStream();

core-common/src/main/java/org/glassfish/jersey/http/JerseyCookie.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

core-common/src/main/java/org/glassfish/jersey/http/JerseyNewCookie.java

Lines changed: 0 additions & 91 deletions
This file was deleted.

core-common/src/main/java/org/glassfish/jersey/http/VersionOptional.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)