|
List Info
Thread: Mongrel BAD CLIENT errors
|
|
| Mongrel BAD CLIENT errors |

|
2006-10-09 20:46:46 |
|
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?
Thanks Dave
|
| Mongrel BAD CLIENT errors |

|
2006-10-10 03:51:08 |
|
On 10/9/06, Dave Havard < david.havard gmail.com">david.havard 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
|
| Mongrel BAD CLIENT errors |

|
2006-10-10 09:39:04 |
|
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 %> <table> <tr> <td>Username:</td> <td><%= text_field("user", "username") %></td>
</tr> <tr> <td>Password:</td> <td><%= password_field("user", "password") %></td> </tr> <tr> <td>Confirm Password:</td>
<td><%= password_field("user", "confirm_password") %></td> </tr> <tr> <td>Email Address:</td> <td><%= text_field("user", "email") %></td>
<tr> <td>First Name:</td> <td><%= text_field("user", "first_name") %></td> </tr> <tr> <td>Last Name:</td>
<td><%= text_field("user", "last_name") %></td> </tr> <tr> <td>Screen Name:</td> <td><%= text_field("user", "screen_name") %></td>
</tr> <tr> <td></td> <td><input type="submit" value="Sign up"/></td> </tr> </table> <%= 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 gmail.com">curt.hibbs gmail.com> wrote:
On 10/9/06, Dave Havard < david.havard gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">david.havard gmail.com
> wrote: | |