-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Update MockWebServer to use Headers. #1270
Conversation
Public API changes to |
LGTM Rats, the tests are hanging! |
Oh, snap. These changes don't look like they could have broken anything either... |
e4586dc
to
4c75f34
Compare
I can get |
6537183
to
0bf76a2
Compare
I can reproduce this locally but the thread dump isn't clear to me what the problem is. |
0bf76a2
to
b3459fd
Compare
7a6cca6
to
963875f
Compare
I'm at a loss for why this still hangs. The thread dumps clearly indicate a SPDY client is waiting to read but that MWS isn't doing anything. |
return headerList; | ||
} | ||
|
||
Headers getNewHeaders() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will eventually replace getHeaders()
but that requires a good bit of refactoring which will be in a follow-up.
963875f
to
8d71c34
Compare
MockResponse response = new MockResponse().setBody("ABCDE").setStatus("HTTP/1.1 200 Sweet") | ||
.withPush(new PushPromise("GET", "/foo/bar", Arrays.asList("foo: bar"), | ||
new MockResponse().setBody("bar").setStatus("HTTP/1.1 200 Sweet"))); | ||
PushPromise pushPromise = new PushPromise("GET", "/foo/bar", Headers.of("foo", "bar"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks nicer
confirmed.. after updating to latest JRE (needed as alpn is pinned to recent ssl classes), master builds fine, but this branch hangs on |
Maybe this doesn't fail in idea because the bootclasspath doesn't have the alpn library set? |
7941820
to
2c630a7
Compare
When I add the ALPN jar to the test config in the IDE it still passes. |
2c630a7
to
b596cac
Compare
I found it!!! |
b596cac
to
b8e2642
Compare
Filed at #1294 |
@@ -817,7 +806,7 @@ private RecordedRequest readRequest(SpdyStream stream) throws IOException { | |||
} else if (name.equals(Header.VERSION)) { | |||
version = value; | |||
} else { | |||
httpHeaders.add(name.utf8() + ": " + value); | |||
httpHeaders.add(name.utf8(), value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the bug. name
can start with a colon causing the line-based parsing to blow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahah!
6c5344e
to
96d39ab
Compare
7d4c88c
to
f5ae323
Compare
f5ae323
to
8e20129
Compare
Had to make two tiny changes:
|
Update MockWebServer to use Headers.
(What an ordeal this was) |
No description provided.