Upgrade httpcore.version to 5.0-beta9

This commit is contained in:
Ryan Schmitt 2019-10-03 13:20:00 -07:00 committed by Oleg Kalnichevski
parent d655994950
commit 90c07f3490
3 changed files with 22 additions and 12 deletions

View File

@ -158,6 +158,11 @@ class LoggingIOSession implements ProtocolIOSession {
}
}
@Override
public boolean isOpen() {
return channel.isOpen();
}
@Override
public void close() {
if (this.log.isDebugEnabled()) {
@ -258,6 +263,16 @@ class LoggingIOSession implements ProtocolIOSession {
return this.id + " " + this.session.toString();
}
@Override
public int read(final ByteBuffer dst) throws IOException {
return channel.read(dst);
}
@Override
public int write(final ByteBuffer src) throws IOException {
return channel.write(src);
}
class LoggingByteChannel implements ByteChannel {
@Override

View File

@ -46,7 +46,6 @@ import org.apache.hc.core5.net.NamedEndpoint;
import org.apache.hc.core5.reactor.Command;
import org.apache.hc.core5.reactor.IOEventHandler;
import org.apache.hc.core5.reactor.IOSession;
import org.apache.hc.core5.reactor.ProtocolLayer;
import org.apache.hc.core5.reactor.ssl.SSLBufferMode;
import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
@ -123,22 +122,18 @@ final class DefaultManagedAsyncClientConnection implements ManagedAsyncClientCon
@Override
public EndpointDetails getEndpointDetails() {
if (ioSession instanceof ProtocolLayer) {
final IOEventHandler handler = ((ProtocolLayer) ioSession).getHandler();
if (handler instanceof HttpConnection) {
return ((HttpConnection) handler).getEndpointDetails();
}
final IOEventHandler handler = ioSession.getHandler();
if (handler instanceof HttpConnection) {
return ((HttpConnection) handler).getEndpointDetails();
}
return null;
}
@Override
public ProtocolVersion getProtocolVersion() {
if (ioSession instanceof ProtocolLayer) {
final IOEventHandler handler = ((ProtocolLayer) ioSession).getHandler();
if (handler instanceof HttpConnection) {
return ((HttpConnection) handler).getProtocolVersion();
}
final IOEventHandler handler = ioSession.getHandler();
if (handler instanceof HttpConnection) {
return ((HttpConnection) handler).getProtocolVersion();
}
return HttpVersion.DEFAULT;
}

View File

@ -67,7 +67,7 @@
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<httpcore.version>5.0-beta8</httpcore.version>
<httpcore.version>5.0-beta9</httpcore.version>
<log4j.version>2.9.1</log4j.version>
<commons-codec.version>1.12</commons-codec.version>
<conscrypt.version>1.4.1</conscrypt.version>