416251 ProxyHTTPToSPDYConnection now sends a 502 to the client if it receives a rst frame from the upstream spdy server
This commit is contained in:
parent
f12afb2888
commit
1ad4f89638
|
@ -199,8 +199,9 @@ public class ProxyHTTPSPDYConnection extends HttpConnection implements HttpParse
|
|||
@Override
|
||||
public void rst(RstInfo rstInfo, Callback handler)
|
||||
{
|
||||
// Not much we can do in HTTP land: just close the connection
|
||||
goAway(new GoAwayInfo(rstInfo.getTimeout(), rstInfo.getUnit()), handler);
|
||||
HttpGenerator.ResponseInfo info = new HttpGenerator.ResponseInfo(HttpVersion.fromString(headers.get
|
||||
("version").value()), null, 0, 502, "SPDY reset received from upstream server", false);
|
||||
send(info, null, true, new Callback.Adapter());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -144,6 +144,8 @@ public class ProxyHTTPToSPDYTest
|
|||
@After
|
||||
public void destroy() throws Exception
|
||||
{
|
||||
httpClient.stop();
|
||||
httpClient2.stop();
|
||||
if (server != null)
|
||||
{
|
||||
server.stop();
|
||||
|
@ -417,6 +419,6 @@ public class ProxyHTTPToSPDYTest
|
|||
}));
|
||||
|
||||
ContentResponse response = httpClient.newRequest("localhost", proxyAddress.getPort()).method(HttpMethod.GET).send();
|
||||
assertThat("response code is 500 OK", response.getStatus(), is(500));
|
||||
assertThat("response code is 502 Gateway Error", response.getStatus(), is(502));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue