Welcome Guest | Login

Rails 2.0.2 app and funky Firefox behavior

I have a newly deployed application (2.0.2) that has a login form on the main page.  When I point safari at the page, fill the form, and submit, the login parameters are posted.  However when I point Firefox at it, Firefox posts the form without the parameters!  Exact same app, exact same state, different behaviors.  Is this a web server configuration problem?

2008-02-15 12:03 PM

-- Bridger
Interesting, what is the form code and the corresponding controller code for that action (before the post)?  Can you paste in the full error trace?

Also, Does it work in FF for you locally?  Are you deploying onto FastCGI or Mongrel?

2008-02-15 06:54 PM

FF locally works fine.  Safari online/local works fine.

FastCGI

Form code:
<% form_tag :action => 'login' do %>
<p>
<label for="username">Username:</label>
<%= text_field_tag "username" %>
</p>
<p>
<label for="password">Password:</label>
<%= password_field_tag "password" %>
</p>
<p id="button">
<%= submit_tag "Sign in" %>
</p>
<% end %>
Action:
  def login
   begin
     if request.post?
       reset_session
       session[:user] = User.authenticate(params[:username], params[:password]).id
       @user = User.find(session[:user])

   rescue
     flash[:notice] = "Invalid username or password"
   end
 end
The thing here is that FF is not even trying to put the username and password in the POST from the form.  Exact same HTML works fine locally, so is something funny going on between FF and the FastCGI server?

2008-02-19 09:08 AM

-- Bridger
Nice avatar by the way... Spurgeon fan?

2008-02-19 09:14 AM

-- Bridger
In over a year of having this avatar on the forum you're the first to mention it. Nice. Yeah, big Spurgeon fan, you?

This must be some bizarre combo of FF/REST/FastCGI

Fire up a mongrel on port 4595 following the mongrel tutorial and have support bump you up for free (follow the instructions when to contact them, mention this thread)

2008-02-19 12:42 PM

"Lectures to my Students" is one of my favorite books.  Definitely the prince of preachers.

2008-02-25 11:22 AM

-- Bridger
Well, it looks like the wonky Firefox behavior goes away when I switch from FastCGI to Mongrel.  Looks like FastCGI is to blame here.

Are there other FastCGI interaction problems that you've seen before?  I'm none to impressed with FastCGI at this point.

2008-02-25 11:24 AM

-- Bridger
FastCGI pops up in a number of random problems.  For many it works well, however - so I suppose it depends one what you're trying to do with it.

2008-02-25 12:01 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.