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

Use the parsed response headers #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KyleAMathews
Copy link

No description provided.

@trentm
Copy link
Owner

trentm commented Aug 25, 2014

@KyleAMathews Hrm. Are those always there? IIRC res._headers either isn't always set or wasn't always set in some versions of node. Perhaps this has changed in recent node versions -- it is an internal var (_-prefixed) after all. Changing the "std serializer" is a compat issue as well to think about. Obviously, if available already, the parse headers are way more useful to have in logs.

@KyleAMathews
Copy link
Author

Hmmm... that might be true. It's been a long time since I've used older versions of node :)

Perhaps include both and check for the existence of _headers before including them? Or only not include _header if _headers does exist?

@qubyte
Copy link

qubyte commented Dec 8, 2014

Any progress on this? I'm using v0.10.33 and the headers are absent.

@trentm
Copy link
Owner

trentm commented Dec 9, 2014

@qubyte No. I don't know the promise (if any) that node makes for res._headers being set (or res._header for that matter). FWIW, node-restify has a res serializer that uses res.headers.

@je-poy
Copy link

je-poy commented Jul 27, 2021

Hello, i am having the same issue here, how about using res.getHeaders() instead? I'm using express 4.16.1(latest version)
i have created a pull request on this #671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants