UP-3698 Call correct method to get header output
Merge remote-tracking branch 'upstream/rel-4-0-patches' into rel-4-0-patches