mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-11 18:42:29 +00:00
Handle more forms of confluent headers
Some frameworks won't allow headers through, normalize case and normalize _ presence.
This commit is contained in:
@@ -629,8 +629,11 @@ def wsock_handler(ws):
|
||||
|
||||
def resourcehandler(env, start_response):
|
||||
for hdr in env['headers_raw']:
|
||||
if hdr[0].startswith('CONFLUENT_'):
|
||||
env['HTTP_' + hdr[0]] = hdr[1]
|
||||
if hdr[0].lower().startswith('confluent'):
|
||||
hdrname = hdr[0].upper()
|
||||
if '_' not in hdrname:
|
||||
hdrname = hdrname.replace('CONFLUENT', 'CONFLUENT_')
|
||||
env['HTTP_' + hdrname] = hdr[1]
|
||||
try:
|
||||
if 'HTTP_SEC_WEBSOCKET_VERSION' in env:
|
||||
for rsp in wsock_handler(env, start_response):
|
||||
|
||||
Reference in New Issue
Block a user