rearrange definition order for keep-alive; always make a chunking/decoding input stream