if (response.status().getStatus() >= 500) {
// TODO should we use this?
writeBuffer.writeShort(0x0A); // status code
} else {
writeBuffer.writeShort(0x0000); // OK
}
int dataLength = request.method() == RestRequest.Method.GET ? response.content().length() : 0;
writeBuffer.writeInt(dataLength + keyLength + extrasLength); // data length
writeBuffer.writeInt(getMemcachedRequest().getOpaque()); // opaque