Today I spent about an hour hunting down the cause of some bizarre behavior in one of our new Rails projects. The action in question handles both GET/POST. In the GET part I do an XMLRPC call to an external system to generate some hash value and store it in the session. This data is then shown on screen and further interaction with the customer is done through Ajax. The content on screen however did not match the value stored in the customer’s session. It turns out the application received two or sometimes three GET request in short succession! However, the browser (Firefox) would only display data from the very first GET request. Where were these other ghostly GET’s coming from??!! They came from this piece of HTML in the default layout template:
<link rel="Shortcut Icon" href="" />
So Firefox (and any other browsers?) will call the current request path of your application for elements with empty hrefs. I think this is proper behavior from the browser, but it might cause some really nasty side effects in your application!! Suffice it to say, the dude responsible for this template will be punished sever…oh crap, that was me too!
-andy