Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routes: do not override response headers #3

Merged
merged 1 commit into from Jun 7, 2022

Conversation

alonbl
Copy link
Contributor

@alonbl alonbl commented Jun 7, 2022

Response headers in dash-2.4 is not a dictionary but Headers.
It also not ideal to override the member but amend values.

File "/home/alonbl/.local/lib/python3.10/site-packages/flask/app.py", line 1889, in process_response
response = self.ensure_sync(func)(response)
File "/home/alonbl/.local/lib/python3.10/site-packages/dash/dash.py", line 1820, in _after_request
response.headers.add("Server-Timing", value)
AttributeError: 'dict' object has no attribute 'add'

Signed-off-by: Alon Bar-Lev alon.barlev@gmail.com

Response headers in dash-2.4 is not a dictionary but Headers.
It also not ideal to override the member but amend values.

  File "/home/alonbl/.local/lib/python3.10/site-packages/flask/app.py", line 1889, in process_response
    response = self.ensure_sync(func)(response)
  File "/home/alonbl/.local/lib/python3.10/site-packages/dash/dash.py", line 1820, in _after_request
    response.headers.add("Server-Timing", value)
AttributeError: 'dict' object has no attribute 'add'

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Copy link
Owner

@jamesholcombe jamesholcombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thanks for the PR, I pulled this lib together in a hurry so contributions more than welcome.
Cheers

@jamesholcombe jamesholcombe merged commit cab0b49 into jamesholcombe:master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants