From 6648e465e0af74cb0bc21095c7e4526b59383bea Mon Sep 17 00:00:00 2001 From: Daniel Vitor Morilha Date: Thu, 25 Feb 2016 17:22:58 -0800 Subject: [PATCH] fixes for crash on HdrHeap::attach_block --- proxy/hdrs/HdrTSOnly.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/hdrs/HdrTSOnly.cc b/proxy/hdrs/HdrTSOnly.cc index 08705d27e14..0ffd11d5b5b 100644 --- a/proxy/hdrs/HdrTSOnly.cc +++ b/proxy/hdrs/HdrTSOnly.cc @@ -62,7 +62,8 @@ HTTPHdr::parse_req(HTTPParser *parser, IOBufferReader *r, int *bytes_used, bool do { int64_t b_avail = r->block_read_avail(); - if (b_avail <= 0 && eof == false) { + //NO POINT IN PARSING THE RESPONSE IF CURRENT BLOCK IS NULL + if (r->get_current_block() == NULL || (b_avail <= 0 && eof == false)) { break; } @@ -161,6 +162,7 @@ int HdrHeap::attach_block(IOBufferBlock *b, const char *use_start) { ink_assert(m_writeable); + ink_assert(b != NULL); RETRY: