square/okhttp — pull request #478 by adriancole (2014-01-23 13:56:47+00:00)
Title: harden http/2 frame read handling by enforcing length bytes actually read

In http/2 virtual streams all share the same socket. If frames are partially read, they will corrupt the connection. If an unknown frame is found, it must be skipped in order to not corrupt the connection.

This change hardens our FrameReader by enforcing that the payload length defined in the frame header is actually read, or skipped in the case of unknown frame types.