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

Version 1.9.1 introduced a bug that breaks addHeaders on express 4.17.1 #35

Open
Hallian opened this issue Nov 25, 2021 · 2 comments
Open

Comments

@Hallian
Copy link

Hallian commented Nov 25, 2021

Version 1.9.1 has introduced a bug that crashes the middleware by trying to access headers with response.headers. This will produce an error at least on express 4.17.1. I believe that the proper way of accessing the headers would be via response.get.

Error produced:

TypeError: Cannot read property 'server-timing' of undefined
    at ServerTiming.addHeaders (/home/phz/workspace/server-timing-header-bug/node_modules/server-timing-header/index.js:283:37)

Minimal example can be found at https://github.com/Hallian/server-timing-header-bug-minimal-example

@maxceem
Copy link

maxceem commented Jan 10, 2022

Came across the same issue. I guess it was introduced by this commit 320574c

@SilentImp
Copy link
Owner

SilentImp commented Mar 20, 2024

=___=''
Ok, I need notifications.
Will take a look at this shortly.

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

No branches or pull requests

3 participants