Improve perfomance of the header matching by calculating a hash
for 'header: value' for both the template and the received requests.