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

Morgan middleware is missing response-time/content-length due to use of response.socket.end() #87

Open
KAJed82 opened this issue Jan 31, 2024 · 0 comments

Comments

@KAJed82
Copy link

KAJed82 commented Jan 31, 2024

I've not dug in to why morgan fails in this case, but when a cache-hit is successful it is unable to register response times or content content length. This seems to be due to morgan relying on the lifetime events fired by response.send/end. Note that firing res.end() after socket.end() does fix the response time but leaves content-length empty (headers are of course correct but morgan results are not)

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

1 participant