[cse491] automated test issue

Alex Nolley nolleyal at msu.edu
Tue Oct 7 18:24:40 PDT 2008


Hey I noticed something kind of odd when running the tests and accessing my
server through Firefox.
When I didn't set the 'Path' attribute on the cookie my server was sending
back to the client, browsing to /auth/print never caused Firefox to send the
cookie back to the server, even though I had already logged in. The only way
Firefox would send the cookie back was when I was browsing in some path
under /auth/login (/auth/login/blah, /auth/login/something, etc...).
However, this method passed all the tests, even though /auth/print returned
'no user specified' and /auth/logout did nothing (which they shouldn't
have).
When I set the 'Path' attribute to '/auth/', then Firefox would return the
cookie whenever I was browsing through any path under /auth/. This allowed
me to see the correct string, 'you are user alex' when under /auth/print,
and would successfully log me out when browsing to /auth/logout. The only
problem is, doing it this way makes the test 'test_auth_login_yes' fail
since the cookie my server is returning is 'user=test; Path=/auth/' and the
header_present function called in 'test_auth_login_yes' is only looking for
'user=test'.
Should I just leave the 'Path' attribute out of it for now?

Thanks,
Alex




More information about the cse491-fall-2008 mailing list