[HttpFoundation] Reverted a part of #7931

refs: #7931