Refactoring method to save/restore previous request attribute