Firefox bug causing an action to be processed twice?


I’m facing a strange bug.
I have a simple action in a simple controller in a simple Rails App
1.2.3, Mongrel 1.0.1).

This action fetches some news in the Database :

def news
@news = News.find(:all)

As you can see, everything is simple.

The strange thing is that this action is called 2 times when I load the
I have logged the HTTP_REFERER and I can see that the first time the
is called, the HTTP_REFERER is the page from which I called the news

and the second time it is the news page itself :

I’ve googeled the problem, and what I found is maybe a Firefox bug (this
problem doesn’t happen in Safari, and it do happen in Camino).
The informations I found are here :

It says that the HTTP header must specify the same charset as the page
meta-tag, which is my case.

Does someone has the same problem, or any clue to help my to solve mine?

Thanks in advance for your help.
Thomas B…

i’ve never experienced this in firefox. hard to say without the full
code… try posting the whole controller(s) and view(s) on pastie and
give us a link:


Thanks for your quick answer.
Here is my controller :

If I put a logger.error(“I was here”) in my “news” action, I can see it
times in my log file.

And here is my view :

Do you see something special?

well, i mocked that up locally the best i could, and i only get one
log message from news. do you have any plugins in firefox that might
be causing this? i’m using v2.0.0.3 on WinXP

Thanks again for your help.
I use Firebug and the WeDevToolbar, but I faced the same strange problem
with Camino (which uses the same rendering engine that Firefox, but
any plugin.)

I’m really clueless about this problem.

Could you also post your layout file? If you say it has something to
do with the headers sent or content type set in the HTML then I’d like
to have a look a that as well.

Wow. Could you repost that pastie or is that what the view actually is?


Here it is :

Thanks for your help,

It’s a problem with pastie.
I’ve choosed Plain text instead of RHTML, and it is now displayed