[Instantrails-users] Mongrel BAD CLIENT errors

Dave Havard
Tue, 10 Oct 2006 09:39:04 -0000

Thank you Curt.

That has got debugging working but has made things no clearer on why some of
my form posts are not working. The post does not seem to get logged - only
reported as a bad client to the console window. Any ideas what I should be
looking for? My view contains the following code:

<% @title = "Sign up" %>
<%= error_messages_for ''user'' %>
<%= form_tag %>


Username:
<%= text_field("user", "username")
%>


Password:
<%= password_field("user", "password")
%>


Confirm Password:
<%= password_field("user",
"confirm_password") %>


Email Address:
<%= text_field("user", "email")
%>

First Name:
<%= text_field("user", "first_name")
%>


Last Name:
<%= text_field("user", "last_name")
%>


Screen Name:
<%= text_field("user", "screen_name")
%>



<input type="submit" value="Sign
up"/>


<%= end_form_tag %>

Whilst my controller looks like:

  def signup
    if request.get?
      @user = User.new
    else
      if params[:user][:password] != params[:user][:confirm_password]
        flash[:notice] = "Passwords do not match!"
      else
        @user = User.new(params[:user])
        if @user.save
          session[:user] = @user.id
          redirect_to :controller => "pages", :action =>
"show", :id => 1
        end
      end
    end
  end

The get part of the view is being rendered fine. Only when I post back is it
failing.

Thanks
Dave

On 10/10/06, Curt Hibbs <curt.hibbs at gmail.com>
wrote:
>
> On 10/9/06, Dave Havard <david.havard at gmail.com> wrote:
> >
> > Hi
> >
> > I have just installed InstantRails and (after some work) have got my
> > existing app working. I am now getting BAD CLIENT errors on some form
posts
> > but have no idea why. Having looked at the mongrel docs it seems I
should be
> > able to get to the bottom of this if I can get debug set to true but I
> > cannot see where to do this in InstantRails?
> >
> > Any pointers?
> >
>
> You''ll need to start mongrel by hand. Use Instant Rails to open a
ruby
> console window (menu command "Rails Applications>Open Ruby Console
Window"),
> change your current directory to move in to your Rails
application''s root
> directory, and then type in the "mongrel_rails" command with
whatever
> options you like.
>
> Curt
>
> _______________________________________________
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/instantrails-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...