Skip to content

Commit 7b6810d

Browse files
authored
Potential fix for environments where WSGI request_uri() fails (#108)
See #103
1 parent 13ac30d commit 7b6810d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

emailproxy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,8 @@ def log_message(self, _format_string, *args):
550550
class RedirectionReceiverWSGIApplication:
551551
def __call__(self, environ, start_response):
552552
start_response('200 OK', [('Content-type', 'text/html; charset=utf-8')])
553-
token_request['response_url'] = wsgiref.util.request_uri(environ)
553+
token_request['response_url'] = token_request['redirect_uri'].rstrip('/') + environ.get(
554+
'PATH_INFO') + '?' + environ.get('QUERY_STRING')
554555
return [('<html><head><title>%s authentication complete (%s)</title><style type="text/css">body{margin:'
555556
'20px auto;line-height:1.3;font-family:sans-serif;font-size:16px;color:#444;padding:0 24px}'
556557
'</style></head><body><p>%s successfully authenticated account %s.</p><p>You can close this '

0 commit comments

Comments
 (0)