Merge pull request #11586 from edx/jeskew/remove_all_request_dot_request

Remove all request.REQUEST usages.
This commit is contained in:
John Eskew
2016-02-25 08:23:12 -05:00
12 changed files with 42 additions and 38 deletions

View File

@@ -756,7 +756,10 @@ def provider_login(request):
# first check to see if the request is an OpenID request.
# If so, the client will have specified an 'openid.mode' as part
# of the request.
querydict = dict(request.REQUEST.items())
if request.method == 'GET':
querydict = dict(request.GET.items())
else:
querydict = dict(request.POST.items())
error = False
if 'openid.mode' in request.GET or 'openid.mode' in request.POST:
# decode request
@@ -899,9 +902,8 @@ def provider_login(request):
return HttpResponseRedirect(openid_request_url)
# determine consumer domain if applicable
return_to = ''
if 'openid.return_to' in request.REQUEST:
return_to = request.REQUEST['openid.return_to']
return_to = request.GET.get('openid.return_to') or request.POST.get('openid.return_to') or ''
if return_to:
matches = re.match(r'\w+:\/\/([\w\.-]+)', return_to)
return_to = matches.group(1)