Corrected type casting in OAuth Response
wsgiref performs header type checking when a response is prepared, including an explicit call of assert type(val) is StringType. Using six.text_type here cast our value to unicode, and sadly StringType in wsgiref is hard-bound to the 'str' method, thus causing the response construction to fail with a type exception. This is preventing users from logging in. Change-Id: I2c32f144a76a5e629204958fc520c4686a327705
This commit is contained in:
parent
1aec1d3e9a
commit
bc982f83c5
@ -14,8 +14,6 @@
|
||||
|
||||
# Default allowed headers
|
||||
|
||||
import six
|
||||
|
||||
ALLOWED_HEADERS = [
|
||||
'origin',
|
||||
'authorization',
|
||||
@ -68,7 +66,7 @@ class CORSMiddleware(object):
|
||||
self.allowed_methods = ','.join(allowed_methods or ALLOWED_METHODS)
|
||||
|
||||
# Cache age.
|
||||
self.max_age = six.text_type(max_age)
|
||||
self.max_age = str(max_age)
|
||||
|
||||
def __call__(self, env, start_response):
|
||||
"""Serve an application request.
|
||||
|
Loading…
x
Reference in New Issue
Block a user