diff options
Diffstat (limited to 'net/spdy/spdy_session.cc')
-rw-r--r-- | net/spdy/spdy_session.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 1ab3904..8d6d9d2 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -685,9 +685,15 @@ void SpdySession::WriteSocket() { // which is now. At this time, we don't compress our data frames. spdy::SpdyFrame uncompressed_frame(next_buffer.buffer()->data(), false); size_t size; - if (uncompressed_frame.is_control_frame()) { + if (spdy_framer_.IsCompressible(&uncompressed_frame)) { scoped_ptr<spdy::SpdyFrame> compressed_frame( spdy_framer_.CompressFrame(&uncompressed_frame)); + if (!compressed_frame.get()) { + LOG(ERROR) << "SPDY Compression failure"; + CloseSessionOnError(net::ERR_SPDY_PROTOCOL_ERROR); + return; + } + size = compressed_frame->length() + spdy::SpdyFrame::size(); DCHECK(size > 0); |