different mechanics for empty headers, add support for both flows