try {
// pri and unused
SpdyConnection.readShort(iob);
HttpMessageBytes reqBytes = ch.getRequest().getMsgBytes();
processHeaders(iob, ch, reqBytes);
} catch (Throwable t) {
log.log(Level.SEVERE, "Error parsing head", t);
abort("Error reading headers " + t);
return;
}
ch.getRequest().processReceivedHeaders();
ch.handleHeadersReceived(ch.getRequest());
if ((currentInFrame.flags & SpdyConnection.Frame.FLAG_HALF_CLOSE) != 0) {
ch.getIn().close();
ch.handleEndReceive();
}
} else if (currentInFrame.type == SpdyConnection.Frame.TYPE_SYN_REPLY) {
int chId = SpdyConnection.readInt(iob);
HttpChannel ch;
synchronized (channels) {
ch = channels.get(chId);
if (ch == null) {
abort("Channel not found");
}
}
try {
SpdyConnection.readShort(iob);
HttpMessageBytes resBytes = ch.getResponse().getMsgBytes();
BBuffer head = processHeaders(iob, ch, resBytes);
} catch (Throwable t) {
log.log(Level.SEVERE, "Error parsing head", t);
abort("Error reading headers " + t);