[http2] fix incorrect copy of headers upon reallocation that leads SIGSEGV