[ticket/12831] reimplemented headers as array

https://tracker.phpbb.com/browse/PHPBB3-12831

PHPBB3-12831