When logging into Drupal for the first time, using a basic HTTP request, the response to the login POST returns *two* Set-Cookie headers. The first one contains an invalid session ID and the second one (in the order in which they appear in the POST response) contains the valid one.
This can be experienced by doing the following:
curl -v -d "name=USERNAME&pass=PASSWORD&form_id=user_login" http://drupal.example.com/user/login
You should see the two "Set-Cookie" headers in the 302 success response.
Most browsers simply ignore the first one and set the second one properly, but unfortunately I have a confused HTTP client library that does it in reverse.
I've tried this with a number of different Drupal servers and I don't suspect that it is related to the domain. I more suspect it's related to PHP or the way Drupal interacts with PHP's sessions.
Comments
Comment #1
xxvelcrar commentedHere's what the HTTP response headers look like.
The first Set-Cookie header is invalid. If you attempt to load a page using it, you get a 403
Comment #2
dpearcefl commentedDue to the age of the last comment on this issue and due to the fact that D5 is no longer supported, I am closing this issue.