Enforcement of dynamic HTTP policies on resource-constrained residential gateways