Fixed bug in domain_remap and cname_lookup middleware

If domain_remap and cname_lookup received request which has no host header,
then returns 500 error. This fixes that problem.

Change-Id: Ibb457e9b4cb21181d8243858c04ce255365690da
Fixes: bug #1100632
Merge "Fixed bug in domain_remap and cname_lookup middleware"