square/okhttp — pull request #352 by adriancole (2013-11-18 01:45:43+00:00)
Title: GOAWAY when payload size is too long

This change enforces the contract wrt payload size on http 2.0 messages.

Before we write a HEADER or DATA frame (the two variable length frames implemented so far), we check to see if it will end up with more than 2^14-1 (16383) octets. According to the [spec](http://tools.ietf.org/html/draft-ietf-httpbis-http2-04#section-9.1), an attempt to go over this should end up in a `GOAWAY` `FRAME_TOO_LARGE` message.