square/okhttp — pull request #505 by adriancole (2014-02-01 20:56:07+00:00)
Title: Flush control frames; don't flush user frames.

This change fixes a bug where during a bench, MockWebServer got an EOFException trying to read the http/2 connection header.

Let the application layer decide when to flush on data. Ideally we flush when we're done sending a full request (headers and body), and that's all. Control frames, such as the connection header need to by flushed immediately.