Skip to content

Commit

Permalink
added the proper prepending of the helios prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed Jan 6, 2009
1 parent f69cc7f commit a515c97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 1 addition & 6 deletions base/session.py
Expand Up @@ -36,12 +36,7 @@ def get_api_client():
# verify the OAuth request
request = cherrypy.request

if request.META.has_key('SCRIPT_NAME'):
full_url = request.META['SCRIPT_NAME'] + request.path_info
else:
full_url = request.path_info

oauth_request = oauth.OAuthRequest.from_request(request.method, full_url, headers= request.headers,
oauth_request = oauth.OAuthRequest.from_request(request.method, request.path_info, headers= request.headers,
parameters=request.params, query_string=None)

if not oauth_request:
Expand Down
8 changes: 7 additions & 1 deletion helios/security.py
Expand Up @@ -54,7 +54,13 @@ def lookup_nonce(self, oauth_consumer, oauth_token, nonce):
def get_api_client(request):
parameters = request.POST.copy()
parameters.update(request.GET)
oauth_request = oauth.OAuthRequest.from_request(request.method, request.path_info, headers= request.META,

if request.META.has_key('SCRIPT_NAME'):
full_url = request.META['SCRIPT_NAME'] + request.path_info
else:
full_url = request.path_info

oauth_request = oauth.OAuthRequest.from_request(request.method, full_url, headers= request.META,
parameters=parameters, query_string=None)

if not oauth_request:
Expand Down

0 comments on commit a515c97

Please sign in to comment.