support for partial and complete header replace