From f1f433041cd66c4f4cbe856ed83b507d1beb0c5b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 26 Nov 2024 12:09:04 -0500 Subject: [PATCH] Restore underscore headers Eventlet has "helpfully" stopped supporting headers with underscores. Restore them since we want to support backwards compatibility and do not have the option to just ignore existing clients. --- confluent_server/confluent/httpapi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index 675a62c3..f3c0b1af 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -623,6 +623,9 @@ 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] try: if 'HTTP_SEC_WEBSOCKET_VERSION' in env: for rsp in wsock_handler(env, start_response):