-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3592 from jamezp/backports-6.2
Back Ports from main to 6.2
- Loading branch information
Showing
23 changed files
with
633 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 6 additions & 31 deletions
37
...etty/src/main/java/org/jboss/resteasy/client/jaxrs/engines/jetty/JettyClientResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
package org.jboss.resteasy.client.jaxrs.engines.jetty; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
import org.jboss.resteasy.client.jaxrs.internal.ClientConfiguration; | ||
import org.jboss.resteasy.client.jaxrs.internal.FinalizedClientResponse; | ||
import org.jboss.resteasy.client.jaxrs.internal.ClientResponse; | ||
import org.jboss.resteasy.tracing.RESTEasyTracingLogger; | ||
|
||
class JettyClientResponse extends FinalizedClientResponse { | ||
private final Runnable cancel; | ||
private InputStream stream; | ||
class JettyClientResponse extends ClientResponse { | ||
|
||
JettyClientResponse(final ClientConfiguration configuration, final InputStream stream, final Runnable cancel) { | ||
JettyClientResponse(final ClientConfiguration configuration, final InputStream stream) { | ||
super(configuration, RESTEasyTracingLogger.empty()); | ||
this.cancel = cancel; | ||
this.stream = stream; | ||
setInputStream(stream); | ||
} | ||
|
||
@Override | ||
protected InputStream getInputStream() { | ||
return stream; | ||
} | ||
|
||
@Override | ||
protected void setInputStream(InputStream is) { | ||
stream = is; | ||
protected void setInputStream(final InputStream is) { | ||
this.is = is; | ||
resetEntity(); | ||
} | ||
|
||
@Override | ||
public void releaseConnection() throws IOException { | ||
releaseConnection(false); | ||
} | ||
|
||
@Override | ||
public void releaseConnection(boolean consumeInputStream) throws IOException { | ||
InputStream is = getInputStream(); | ||
if (is != null && consumeInputStream) { | ||
while (is.read() > 0) { | ||
} | ||
} | ||
cancel.run(); | ||
} | ||
|
||
} |
102 changes: 0 additions & 102 deletions
102
...jetty/src/main/java/org/jboss/resteasy/client/jaxrs/engines/jetty/JettyContentStream.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.