This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
public res.headers #3992
Comments
langpavel
added a commit
to langpavel/node
that referenced
this issue
Sep 18, 2012
Reads out all headers that's already been queued but not sent to the client. Keys are proper-case as they will (or was) sent. Usefull for logging Example: ```js console.log(response.getHeaders()); // { 'Content-Type': 'text/plain' } ``` This addressed nodejs#3992
@visionmedia please review 82a6d45 |
Planning a significant http refactor for 0.12. Let's do this then. |
I guess this could be closed, right? We have |
hmm it would be a lot better if we just exposed a nicer populated object but that works I suppose |
Ok, reopened. |
I would like to claim this, as was discussed on IRC. |
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
Feb 9, 2015
Users should not have to access private attributes like res._headers in order to get all the headers in a request. Define a method getAllHeaders to return an object which is a copy of res._headers Fixes: nodejs/node-v0.x-archive#3992 PR-URL: nodejs#170 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Chris Dickinson <[email protected]>
@indutny ... just confirming, this landed in io.js already correct? |
Deferring to the io.js discussion on this. see nodejs/node#772 |
In summary: this a huge headache now, probably requires the http re-write to have a reasonable and long-term API. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
pretty lame to use
res._headers
for loggingThe text was updated successfully, but these errors were encountered: