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

[UNDERTOW-822] HTTP2 headers - another HTTP2 spec compliance checks #426

Merged

Conversation

jstourac
Copy link
Contributor

@jstourac jstourac commented Sep 6, 2016

  • HTTP2 request MUST NOT contain 'connection' header
  • HTTP2 request MAY contain 'te' header but if so, then just with value 'trailers'
  • fix: check for 'connect' method (used contains instead of wrong equals method now)

- HTTP2 request MUST NOT contain 'connection' header
- HTTP2 request MAY contain 'te' header but if so, then just with value 'trailers'

- fix: check for 'connect' method (used contains instead of wrong equals method now)
@undertow-pull-request
Copy link

Windows Build 1760 outcome was FAILURE using a merge of c647edd
Summary: Execution timeout; tests failed: 3 (1 new), passed: 2478, ignored: 507 Build time: 00:30:04

Failed tests

io.undertow.server.handlers.proxy.LoadBalancingProxyTestCase.testDuplicateHeaders{proxy}{https}: java.lang.AssertionError: Test failed with i=2 expected:<200> but was:<500>
------- Stderr: -------
15:01:33,690 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:01:33,695 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:01:33,701 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,708 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,716 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@181f8dd for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,724 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@136e22c for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:01:33,732 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:01:33,737 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:01:33,744 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,750 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,759 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@1c02b96 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,766 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@1f9aca1 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:01:33,775 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:01:33,781 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:01:33,788 DEBUG (XNIO-1 I/O-8) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,795 DEBUG (XNIO-1 I/O-8) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}
15:01:33,802 DEBUG (XNIO-1 I/O-8) [io.undertow.client] <HttpClientConnection.java:525> Connection closed with IOException: java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
    at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:286)
    at org.xnio.conduits.PushBackStreamSourceConduit.read(PushBackStreamSourceConduit.java:52)
    at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:522)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)

15:01:33,822 ERROR (XNIO-1 I/O-8) [io.undertow.proxy] <ProxyHandler.java:653> UT005028: Proxy request to /session failed: java.io.IOException: UT001000: Connection closed
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:528)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)

15:01:33,830 DEBUG (XNIO-1 I/O-8) [io.undertow.request.error-response] <DelegatingBasicLogger.java:424> Setting error code 500 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], X-Forwarded-Server=[localhost], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Connection=[keep-alive], X-Forwarded-Proto=[http], X-Forwarded-Port=[7777], X-Forwarded-For=[127.0.0.1], Cookie=[JSESSIONID=11gkvRQCyemG1qDVd3Bx6jaNNH5563iPQgZM2soO.s1], Cookie2=[$Version=1], Host=[localhost:7777], X-Forwarded-Host=[localhost]} response {}}: java.lang.RuntimeException
    at io.undertow.server.HttpServerExchange.setStatusCode(HttpServerExchange.java:1374)
    at io.undertow.server.handlers.proxy.ProxyHandler$ResponseCallback.failed(ProxyHandler.java:655)
    at io.undertow.client.http.HttpClientExchange.setFailed(HttpClientExchange.java:148)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:528)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)


io.undertow.server.handlers.proxy.LoadBalancingProxyHttpsTestCase.testDuplicateHeaders: java.lang.AssertionError: Test failed with i=3 expected:<200> but was:<500>
------- Stderr: -------
14:54:35,416 DEBUG (XNIO-1 I/O-3) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
14:54:35,420 DEBUG (XNIO-1 I/O-3) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
14:54:35,431 DEBUG (XNIO-1 I/O-3) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@35a9f8 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
14:54:35,443 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,449 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,462 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@64aa04 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,475 DEBUG (XNIO-1 I/O-7) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,480 DEBUG (XNIO-1 I/O-7) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,492 DEBUG (XNIO-1 I/O-7) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@1ed001a for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,500 DEBUG (XNIO-1 I/O-1) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,505 DEBUG (XNIO-1 I/O-1) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=awgOr2Bi1Yw0wACBfhCVMIA-1JBjxzgHx5BTagAX.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
14:54:35,512 DEBUG (XNIO-1 I/O-1) [io.undertow.request.io] <SslConduit.java:614> UT005013: An IOException occurred: java.io.IOException: javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
    at io.undertow.protocols.ssl.SslConduit.notifyReadClosed(SslConduit.java:614)
    at io.undertow.protocols.ssl.SslConduit.closed(SslConduit.java:983)
    at io.undertow.protocols.ssl.SslConduit.close(SslConduit.java:1078)
    at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:799)
    at io.undertow.protocols.ssl.SslConduit.doWrap(SslConduit.java:849)
    at io.undertow.protocols.ssl.SslConduit.write(SslConduit.java:371)
    at io.undertow.client.http.HttpRequestConduit.processWrite(HttpRequestConduit.java:113)
    at io.undertow.client.http.HttpRequestConduit.flush(HttpRequestConduit.java:573)
    at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:229)
    at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)
    at org.xnio.ChannelListeners$14.handleEvent(ChannelListeners.java:413)
    at org.xnio.ChannelListeners$14.handleEvent(ChannelListeners.java:409)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.writeReady(WriteReadyHandler.java:65)
    at io.undertow.protocols.ssl.SslConduit$SslWriteReadyHandler.writeReady(SslConduit.java:1224)
    at io.undertow.protocols.ssl.SslConduit$4.run(SslConduit.java:430)
    at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:580)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:464)
Caused by: javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
    at sun.security.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1561)
    at io.undertow.protocols.ssl.SslConduit.notifyReadClosed(SslConduit.java:612)
    ... 17 more

14:54:35,537 ERROR (XNIO-1 I/O-1) [io.undertow.proxy] <ProxyHandler.java:653> UT005028: Proxy request to /session failed: java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
    at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:286)
    at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:700)
    at io.undertow.protocols.ssl.SslConduit.doWrap(SslConduit.java:849)
    at io.undertow.protocols.ssl.SslConduit.write(SslConduit.java:371)
    at io.undertow.client.http.HttpRequestConduit.processWrite(HttpRequestConduit.java:113)


io.undertow.server.handlers.proxy.LoadBalancingProxyTestCase.testDuplicateHeaders{proxy}{http2-clear-upgrade}: java.lang.AssertionError: Test failed with i=2 expected:<200> but was:<500>
------- Stderr: -------
15:08:58,179 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:08:58,181 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:08:58,184 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,187 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,190 DEBUG (XNIO-1 I/O-5) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@10bc550 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,193 DEBUG (XNIO-1 I/O-2) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@1c9fa46 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Host=[localhost:7777]} response {}}
15:08:58,197 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:08:58,201 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:08:58,204 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,207 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,211 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@166a1d1 for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,214 DEBUG (XNIO-1 I/O-4) [io.undertow.server.handlers.proxy] <ProxyHandler.java:617> Received response io.undertow.client.ClientResponse@17c151e for request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:08:58,221 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:08:58,224 DEBUG (XNIO-1 I/O-6) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {Connection=[close], a=[b, b, b, b, b, b, b, b], Cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], User-Agent=[Apache-HttpClient/4.2.6 (java 1.5)], Cookie2=[$Version=1], Host=[localhost:7777]} response {}}
15:08:58,227 DEBUG (XNIO-1 I/O-1) [io.undertow.server.handlers.proxy] <ProxyHandler.java:500> Sending request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,230 DEBUG (XNIO-1 I/O-1) [io.undertow.server.handlers.proxy] <ProxyHandler.java:507> Sent request ClientRequest{path='/session', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}
15:08:58,233 DEBUG (XNIO-1 I/O-1) [io.undertow.client] <HttpClientConnection.java:525> Connection closed with IOException: java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
    at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:286)
    at org.xnio.conduits.PushBackStreamSourceConduit.read(PushBackStreamSourceConduit.java:52)
    at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:522)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)

15:08:58,242 ERROR (XNIO-1 I/O-1) [io.undertow.proxy] <ProxyHandler.java:653> UT005028: Proxy request to /session failed: java.io.IOException: UT001000: Connection closed
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:528)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)

15:08:58,246 DEBUG (XNIO-1 I/O-1) [io.undertow.request.error-response] <DelegatingBasicLogger.java:424> Setting error code 500 for exchange HttpServerExchange{ GET /session request {a=[b, b, b, b, b, b, b, b], x-disable-push=[true], x-forwarded-server=[localhost], user-agent=[Apache-HttpClient/4.2.6 (java 1.5)], x-forwarded-proto=[http], x-forwarded-port=[7777], x-forwarded-for=[127.0.0.1], cookie=[JSESSIONID=tcssrTMlFYeZCi3-oN-1ryRD8GvtT6oyp_ryQhHZ.s1], cookie2=[$Version=1], x-forwarded-host=[localhost], Host=[localhost:7777]} response {}}: java.lang.RuntimeException
    at io.undertow.server.HttpServerExchange.setStatusCode(HttpServerExchange.java:1374)
    at io.undertow.server.handlers.proxy.ProxyHandler$ResponseCallback.failed(ProxyHandler.java:655)
    at io.undertow.client.http.HttpClientExchange.setFailed(HttpClientExchange.java:148)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:528)
    at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:485)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)


@stuartwdouglas stuartwdouglas merged commit 2c004a8 into undertow-io:master Sep 6, 2016
@jstourac jstourac deleted the fixHttp2PseudoHdrCheck2 branch September 20, 2016 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants