backport for issue #2627

Fixing WebFilter session wrapper to conform to Servlet Spec