summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorThomas Becker2012-07-06 08:56:51 (EDT)
committer Thomas Becker2012-07-06 09:46:31 (EDT)
commitac7c3c8f0d36ed4281fe60bc9b3ccf2abf0b5c5c (patch)
treebce2e0cb51f823013f43ab15226ab911ad37d19c
parentf4ebc89ee3c49fcdb43fd10abe541ee4e6e50440 (diff)
downloadorg.eclipse.jetty.project-ac7c3c8f0d36ed4281fe60bc9b3ccf2abf0b5c5c.zip
org.eclipse.jetty.project-ac7c3c8f0d36ed4281fe60bc9b3ccf2abf0b5c5c.tar.gz
org.eclipse.jetty.project-ac7c3c8f0d36ed4281fe60bc9b3ccf2abf0b5c5c.tar.bz2
spdy: move x-spdy-push header to internal request. fix StandardStream.toString()refs/changes/52/6652/1
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java2
-rw-r--r--jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java2
-rw-r--r--jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyV2Test.java3
3 files changed, 3 insertions, 4 deletions
diff --git a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java
index b4d0c60..a99536f 100644
--- a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java
+++ b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java
@@ -440,7 +440,7 @@ public class StandardStream implements IStream
@Override
public String toString()
{
- return String.format("stream=%d v%d windowSize=%db reset=%s %s %s", getId(), session.getVersion(), windowSize, isReset(), openState, closeState);
+ return String.format("stream=%d v%d windowSize=%db reset=%s %s %s", getId(), session.getVersion(), getWindowSize(), isReset(), openState, closeState);
}
private boolean canSend()
diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
index 6f7ca5a..4e3d0ae 100644
--- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
+++ b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
@@ -444,6 +444,7 @@ public class ServerHTTPSPDYAsyncConnection extends AbstractHttpConnection implem
requestHeaders.put("referer", referrer);
// Remember support for gzip encoding
requestHeaders.put(headers.get("accept-encoding"));
+ requestHeaders.put("x-spdy-push", "true");
return requestHeaders;
}
@@ -460,7 +461,6 @@ public class ServerHTTPSPDYAsyncConnection extends AbstractHttpConnection implem
}
pushHeaders.put(HTTPSPDYHeader.STATUS.name(version), "200");
pushHeaders.put(HTTPSPDYHeader.VERSION.name(version), "HTTP/1.1");
- pushHeaders.put("x-spdy-push", "true");
return pushHeaders;
}
diff --git a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyV2Test.java b/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyV2Test.java
index cc2435e..ab24521 100644
--- a/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyV2Test.java
+++ b/jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategyV2Test.java
@@ -748,8 +748,7 @@ public class ReferrerPushStrategyV2Test extends AbstractHTTPSPDYTest
{
if (validateHeader(headers, HTTPSPDYHeader.STATUS.name(version()), "200")
&& validateHeader(headers, HTTPSPDYHeader.VERSION.name(version()), "HTTP/1.1")
- && validateUriHeader(headers)
- && validateHeader(headers, "x-spdy-push", "true"))
+ && validateUriHeader(headers))
pushSynHeadersValid.countDown();
}