Properly handle HTTP HOST header