reworked httpContext instanciation logic

Change-Id: I797b73b395dab220a1709b85a025dd413279fb88