Rails is redirecting multiple times?

I am getting some very strange behavior where Rails seems to be
sending multiple redirects to the client from one action. The code
does not suggest this could happen, but I am seeing the following log
entries:

Processing FacebookAppsController#post_add (for 99.230.141.157 at
2007-12-18 14:15:42) [GET]
Session ID: 382613da73aee01e1bec169f9df9c8f2
Parameters: {“api_key”=>“921198edc5e865404c05da8a71f300c2”,
“installed”=>“1”, “action”=>“post_add”,
“auth_token”=>“54b130636eb352a4d53014d645cad9e5”,
“controller”=>“facebook_apps”}
Redirected to

Completed in 0.09034 (11 reqs/sec) | DB: 0.05949 (65%) | 302 Found
[http://production.rapouts.com/facebook_apps/post_add?
api_key=921198edc5e865404c05da8a71f300c2&auth_token=54b130636eb352a4d53014d645cad9e5&installed=1]
Cookie set: viewer_token=6fafdc44-0b5b-472a-b04c-12ff8bc0956d; path=/;
expires=Sat, 16 Feb 2008 22:15:42 GMT
Redirected to
Log into Facebook
<Log into Facebook?
cookie_token=6fafdc44-0b5b-472a-
b04c-12ff8bc0956d&app=5&referrer=42712&action=pre_add&api_key=921198edc5e865404c05da8a71f300c2&referral_token=839976c8-27dd-4be1-
b68e-5791c42af7dd&campaign=61&controll>
Completed in 0.07579 (13 reqs/sec) | DB: 0.07197 (94%) | 302 Found
[http://production.rapouts.com/facebook_apps/post_add?
api_key=921198edc5e865404c05da8a71f300c2&auth_token=54b130636eb352a4d53014d645cad9e5&installed=1]

Note that there are two redirects in there. I am seeing this happen
repeatedly in my logs, so I don’t think this was just two mongrels
having log messages overlap as sometimes happens.

Does anyone have any ideas on this?

I don’t see two redirects. I see this as the first request:

Processing FacebookAppsController#post_add (for 99.230.141.157 at
2007-12-18 14:15:42) [GET]
Session ID: 382613da73aee01e1bec169f9df9c8f2
Parameters: {“api_key”=>“921198edc5e865404c05da8a71f300c2”,
“installed”=>“1”, “action”=>“post_add”,
“auth_token”=>“54b130636eb352a4d53014d645cad9e5”,
“controller”=>“facebook_apps”}
Redirected to

Completed in 0.09034 (11 reqs/sec) | DB: 0.05949 (65%) | 302 Found
*
And then this as another:

*[http://production.rapouts.com/facebook_apps/post_add?
api_key=921198edc5e865404c05da8a71f300c2&auth_token=54b130636eb352a4d53014d645cad9e5&installed=1
]
Cookie set: viewer_token=6fafdc44-0b5b-472a-b04c-12ff8bc0956d; path=/;
expires=Sat, 16 Feb 2008 22:15:42 GMT
Redirected to
Log into Facebook
<Log into Facebook?
cookie_token=6fafdc44-0b5b-472a-
b04c-12ff8bc0956d&app=5&referrer=42712&action=pre_add&api_key=921198edc5e865404c05da8a71f300c2&referral_token=839976c8-27dd-4be1-
b68e-5791c42af7dd&campaign=61&controll>
Completed in 0.07579 (13 reqs/sec) | DB: 0.07197 (94%) | 302 Found

Your application isn’t erroring, is it? You shouldn’t have to worry
about
anything if it isn’t.

On Dec 19, 2007 11:55 AM, NHorton [email protected] wrote:

“installed”=>“1”, “action”=>“post_add”,
expires=Sat, 16 Feb 2008 22:15:42 GMT

api_key=921198edc5e865404c05da8a71f300c2&auth_token=54b130636eb352a4d53014d645cad9e5&installed=1
]

Note that there are two redirects in there. I am seeing this happen
repeatedly in my logs, so I don’t think this was just two mongrels
having log messages overlap as sometimes happens.

Does anyone have any ideas on this?


Ryan B.