Skip to content

Commit

Permalink
using case insensitive headers
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-dunteman committed Nov 28, 2023
1 parent 1c4ada9 commit 57968cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions potassium/potassium.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Generator, Optional, Union
from flask import Flask, request, make_response, abort, Response as FlaskResponse
from werkzeug.serving import make_server
from werkzeug.datastructures.headers import EnvironHeaders
from threading import Thread, Lock, Condition
import functools
import traceback
Expand All @@ -15,9 +16,8 @@ def __init__(self, type, func):
self.type = type
self.func = func


class Request():
def __init__(self, id: str, headers: dict, json: dict):
def __init__(self, id: str, headers: EnvironHeaders, json: dict):
self.id = id
self.headers = headers
self.json = json
Expand Down Expand Up @@ -183,7 +183,7 @@ def _handle_generic(self, endpoint, flask_request):

try:
req = Request(
headers=dict(flask_request.headers),
headers=flask_request.headers,
json=flask_request.get_json(),
id=flask_request.headers.get("X-Banana-Request-Id", "")
)
Expand Down

0 comments on commit 57968cc

Please sign in to comment.