Welcome! Log In Create A New Profile

Advanced

Re: Proxying to node.js + express.js, session doesn't persist

July 21, 2011 11:18AM
Here's what I see in the browser
---------Logging in-------------

Request Headers
Host 173.203.105.235
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Accept */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
Content-Type application/json; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://173.208.105.235/api.html
Content-Length 87

-----------------------------

Response Headers
Server nginx/1.0.4
Date Thu, 21 Jul 2011 14:55:06 GMT
Transfer-Encoding chunked
Connection keep-alive
X-Powered-By Express
Set-Cookie wdialef51s00s=4edaae8b004e0c6d740968fd6b7f9c89c23b5a2a0d373de44a937605899127bc; path=/; expires=Thu, 21 Jul 2011 15:10:06 GMT; httpOnly connect.sid=L96yGUBwoDwrQLqm2xlhBsZB.XHduhuaqAHqocaN6%2F0gCKQG6uiZtPb1UsSdGRTFpxgM; path=/; expires=Thu, 21 Jul 2011 15:05:11 GMT; httpOnly
--------------------------------

Login successful. As you can see, connect.id cookie is set (this is what Express.js session uses). Now, I make a request to resource where session is checked:

--------------------------------
Request Headers
Host 173.203.105.235
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Accept */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
X-Requested-With XMLHttpRequest
Referer http://173.208.105.235/api.html
Cookie wdialef51s00s=4edaae8b004e0c6d740968fd6b7f9c89c23b5a2a0d373de44a937605899127bc; connect.sid=L96yGUBwoDwrQLqm2xlhBsZB.XHduhuaqAHqocaN6%2F0gCKQG6uiZtPb1UsSdGRTFpxgM

-------------------------------

Response Headers
Server nginx/1.0.4
Date Thu, 21 Jul 2011 14:56:09 GMT
Transfer-Encoding chunked
Connection keep-alive
X-Powered-By Express
Set-Cookie connect.sid=L96yGUBwoDwrQLqm2xlhBsZB.XHduhuaqAHqocaN6%2F0gCKQG6uiZtPb1UsSdGRTFpxgM; path=/; expires=Thu, 21 Jul 2011 15:05:11 GMT; httpOnly

-------------------------------

Now, I just stumbled upon something I didn't notice yesterday: the property that I save on request session - the one that I can't get to work - apparently DOES work sometimes. Basically, if I keep logging in and requesting resource - it works on some attempts. However, if I keep requesting the resource after successful attempt - it breaks after few requests and session goes back to original state.

This is just bizarre.
Subject Author Posted

Proxying to node.js + express.js, session doesn't persist

ilya July 21, 2011 06:45AM

Re: Proxying to node.js + express.js, session doesn't persist

Maxim Dounin July 21, 2011 07:54AM

Re: Proxying to node.js + express.js, session doesn't persist

ilya July 21, 2011 11:18AM

Re: Proxying to node.js + express.js, session doesn't persist

Maxim Dounin July 21, 2011 11:36AM

Re: Proxying to node.js + express.js, session doesn't persist

ilya July 21, 2011 11:45AM

Re: Proxying to node.js + express.js, session doesn't persist

Maxim Dounin July 21, 2011 12:14PM

Re: Proxying to node.js + express.js, session doesn't persist

ilya July 21, 2011 12:28PM

Re: Proxying to node.js + express.js, session doesn't persist

Maxim Dounin July 21, 2011 04:54PM

Re: Proxying to node.js + express.js, session doesn't persist

ilya July 21, 2011 08:03PM

Re: Proxying to node.js + express.js, session doesn't persist

jzabel May 10, 2012 12:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready