supporting custom headers when registering handlers