Closed gx0r closed 9 years ago
So basically it does not see a cookie that was sent by a browser?
Yes, exactly. Browser sends 3 cookies, looks like only first one ("koa:sess") was seen on server.
Interesting! I'll figure it out ;)
According to the logs, the cookie appears to be received by the server. Do you have a test case?
I don't get JWT cookie on the server. I don't have a test case yet, just found it toggling back and forth between SPDY and HTTPS.
In debug log on server, cookie looks like
cookie: 'koa:sess=eyJwaG9uZW51bWJlclVuYXV0aGVkIjpudWxsLCJfZXhwaXJlIjoxMTQzOTM0OTI5MTkxNSwiX21heEFnZSI6OTk5OTk5OTk5OTAwMH0='
But I would expect it to show:
cookie:koa:sess=eyJwaG9uZW51bWJlclVuYXV0aGVkIjpudWxsLCJfZXhwaXJlIjoxMTQzOTM0OTI5MTkxNSwiX21heEFnZSI6OTk5OTk5OTk5OTAwMH0=; koa:sess.sig=bALfJCqWqJY8LmXOotL2Mvmk_yU; jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwaG9uZW51bWJlciI6IjU1NTg2NzUzMDkiLCJpYXQiOjE0MzkzNTA0NjV9.k4QRQsEKMSqUOX3D9cJTI-dU2xmr5j8z4w-h2Y8yGL4
If that makes sense. It appears to lose jwt and koa:sess.sig cookies :+1:
Arrgh. I see, one sec
Fixed, thanks! Please update to rc4
Awesom! I might be getting one last bug now, I'm using https://github.com/koajs/session and something is still amiss with the cookies. I put a value into the session and it gets lost only on spdy. I'll put together more info later.
@llambda yeah, I need a test case :)
Sure. It seems like the proper cookies are visible in debug output now, but when koa-session calls this.cookies.get(opts.key, opts);
it gets an undefined.
With a cookie header like:
cookie:koa:sess=eyJwaG9uZW51bWJlclVuYXV0aGVkIjpudWxsLCJfZXhwaXJlIjoxMTQzOTM0OTI5MTkxNSwiX21heEFnZSI6OTk5OTk5OTk5OTAwMH0=; koa:sess.sig=bALfJCqWqJY8LmXOotL2Mvmk_yU; jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwaG9uZW51bWJlciI6IjU1NTg2NzUzMDkiLCJpYXQiOjE0MzkzNDk0MjB9.bSvXG8Ig4TjmAgRIAlxFCvX7ndquI6rEDDEjOEe7G-c
From koa app, this.cookies.get('jwt') returns nothing.
Here is browser request headers sent: