Removed code duplication and prevents mutating passed in header_fields
Merge pull request #20 from RR2DO2/timedjws

Removed code duplication and prevents mutating passed in header_fields