Skip to content

Commit 42eabc6

Browse files
committed
Fix koush#299
HTTP Message is optional.
1 parent cb37d1c commit 42eabc6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

AndroidAsync/src/com/koushikdutta/async/http/spdy/SpdyMiddleware.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ protected void transform(List<Header> result) throws Exception {
370370
String status = headers.remove(Header.RESPONSE_STATUS.utf8());
371371
String[] statusParts = status.split(" ", 2);
372372
data.response.code(Integer.parseInt(statusParts[0]));
373-
data.response.message(statusParts[1]);
373+
if (statusParts.length == 2)
374+
data.response.message(statusParts[1]);
374375
data.response.protocol(headers.remove(Header.VERSION.utf8()));
375376
data.response.headers(headers);
376377
setComplete(headers);

0 commit comments

Comments
 (0)