-
Notifications
You must be signed in to change notification settings - Fork 18
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
TypeError: Cannot read property 'Set-Cookie' of undefined #8
Comments
So, I'm pretty sure the additions I made for I think this library needs to be updated to use the new core API. |
Found a fix, but I don't know if this will not break up whole script, because I just removed the |
Making sure that headers is initialized on entry to response.js has been working for me. |
I am having the same error now on node v0.10.24 @ sesh/node_modules/response/lib/response.js:14 headers is undefined. so line 15 is wrong. headers[k] = headers[k] || that._additionalHeaders[k]; Change to the following work.
Does anyone think it might break other somewhere ??? Best Regards, |
If I add sesh to the download example from http://stackoverflow.com/questions/7288814/download-file-from-nodejs-server, I get the error below.
The following insertion to the first line of response.js's writeHead function seems to fix the problem:
headers = headers || {};
/Users/paulb/mds110804/node_modules/sesh/node_modules/response/lib/response.js:14
headers[k] = headers[k] || that._additionalHeaders[k];
^
TypeError: Cannot read property 'Set-Cookie' of undefined
at /Users/paulb/mds110804/node_modules/sesh/node_modules/response/lib/response.js:14:33
at Array.forEach (native)
at ServerResponse.writeHead
(/Users/paulb//mds110804/node_modules/sesh/node_modules/response/lib/response.js:13:46)
at ServerResponse._implicitHeader (http.js:797:8)
at ServerResponse.end (http.js:654:10)
at /Users/paulb/mds110804/server/download.js:33:17
The text was updated successfully, but these errors were encountered: