permit empty header values, similar to @mipaaa's fork

The change to handling %O following %b's rules is NOT included, as I've added proper support for %b.