Merged branch 'master' into 'jetty-9.1'.
This commit is contained in:
commit
ff3b36cfb0
|
@ -106,7 +106,7 @@ public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory
|
|||
("gzip")))
|
||||
headers.add("accept-encoding", "gzip");
|
||||
HttpTransportOverSPDY transport = new HttpTransportOverSPDY(connector, httpConfiguration, endPoint,
|
||||
pushStrategy, stream, headers, getVersion());
|
||||
pushStrategy, stream, headers);
|
||||
HttpInputOverSPDY input = new HttpInputOverSPDY();
|
||||
HttpChannelOverSPDY channel = new HttpChannelOverSPDY(connector, httpConfiguration, endPoint, transport, input, stream);
|
||||
stream.setAttribute(CHANNEL_ATTRIBUTE, channel);
|
||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.jetty.spdy.api.HeadersInfo;
|
|||
import org.eclipse.jetty.spdy.api.PushInfo;
|
||||
import org.eclipse.jetty.spdy.api.ReplyInfo;
|
||||
import org.eclipse.jetty.spdy.api.SPDY;
|
||||
import org.eclipse.jetty.spdy.api.Session;
|
||||
import org.eclipse.jetty.spdy.api.Stream;
|
||||
import org.eclipse.jetty.spdy.api.StreamStatus;
|
||||
import org.eclipse.jetty.spdy.http.HTTPSPDYHeader;
|
||||
|
@ -69,7 +70,7 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
private final BlockingCallback streamBlocker = new BlockingCallback();
|
||||
private final AtomicBoolean committed = new AtomicBoolean();
|
||||
|
||||
public HttpTransportOverSPDY(Connector connector, HttpConfiguration configuration, EndPoint endPoint, PushStrategy pushStrategy, Stream stream, Fields requestHeaders, short version)
|
||||
public HttpTransportOverSPDY(Connector connector, HttpConfiguration configuration, EndPoint endPoint, PushStrategy pushStrategy, Stream stream, Fields requestHeaders)
|
||||
{
|
||||
this.connector = connector;
|
||||
this.configuration = configuration;
|
||||
|
@ -77,7 +78,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
this.pushStrategy = pushStrategy == null ? new PushStrategy.None() : pushStrategy;
|
||||
this.stream = stream;
|
||||
this.requestHeaders = requestHeaders;
|
||||
this.version = version;
|
||||
Session session = stream.getSession();
|
||||
this.version = session.getVersion();
|
||||
}
|
||||
|
||||
protected Stream getStream()
|
||||
|
@ -255,7 +257,7 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
PushStrategy pushStrategy, Stream stream, Fields requestHeaders,
|
||||
PushResourceCoordinator coordinator, short version)
|
||||
{
|
||||
super(connector, configuration, endPoint, pushStrategy, stream, requestHeaders, version);
|
||||
super(connector, configuration, endPoint, pushStrategy, stream, requestHeaders);
|
||||
this.coordinator = coordinator;
|
||||
this.version = version;
|
||||
}
|
||||
|
|
|
@ -73,22 +73,22 @@ public class HttpTransportOverSPDYTest
|
|||
@Mock
|
||||
HttpGenerator.ResponseInfo responseInfo;
|
||||
|
||||
private Random random = new Random();
|
||||
Random random = new Random();
|
||||
short version = SPDY.V3;
|
||||
|
||||
HttpTransportOverSPDY httpTransportOverSPDY;
|
||||
private short version = SPDY.V3;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
Fields requestHeaders = new Fields();
|
||||
requestHeaders.add(HTTPSPDYHeader.METHOD.name(version), "GET");
|
||||
httpTransportOverSPDY = new HttpTransportOverSPDY(connector, httpConfiguration, endPoint, pushStrategy,
|
||||
stream, requestHeaders, version);
|
||||
when(responseInfo.getStatus()).thenReturn(HttpStatus.OK_200);
|
||||
when(stream.getSession()).thenReturn(session);
|
||||
when(session.getVersion()).thenReturn(SPDY.V3);
|
||||
when(stream.isClosed()).thenReturn(false);
|
||||
httpTransportOverSPDY = new HttpTransportOverSPDY(connector, httpConfiguration, endPoint, pushStrategy,
|
||||
stream, requestHeaders);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue