Bug of the day: cookie not being saved? Check your host-name.

Lesson learnt today.

Apparently, underscores are not part of the standard for a host name. However, your browser (and DNS server and all the links in between) will accept underscores in the host name.

But, when you have Safari set to “only accept cookies for sites that I visit” the underscore in the cookie’s host will cause Safari to silently discard the cookie. Leaving you with a strange log-in bug that seems to defy explanation.

The solutions – make your host name compliant with the standard. And until you can do that, switch Safari to “accept all cookies”.

Tags: , , ,

This entry was posted on Monday, April 27th, 2009 at 2:55 pm and is filed under General, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.