I believe you should be able to just iterate through request.META directly, without calling the keys method.