Forum: Ruby on Rails File Upload Problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E34331b0673de4add7fd825a0848cc04?d=identicon&s=25 Evan Haveman (emh)
on 2006-03-15 10:58
works fine with webbrick

but when running through dispatch.cgi or .fcgi it fails with this error:

malformed header from script. Bad header=image/jpeg:
/home/emh/phocab.com/public/dispatch.cgi

or if using fastcgi:

FastCGI: comm with server "/home/emh/phocab.com/public/dispatch.fcgi"
aborted: error parsing headers: malformed header 'image/jpeg'

i repeat, it works fine with webbrick

here is my html:

<%= form_tag({:controller => 'phocab', :action => 'submit_photo'},
{:multipart => true}) %>
  <%= select("photo", "word_id", @words) %><br/>
  <%= file_field("photo", "photo") %><br/>
  <%= submit_tag "submit" %>
<%= end_form_tag %>

any ideas?

i am hosting my site with dreamhost if that helps...
E34331b0673de4add7fd825a0848cc04?d=identicon&s=25 Evan Haveman (emh)
on 2006-03-15 11:22
argh, another hour of searching and i discover that fastcgi chokes if
your code has any puts statements...
This topic is locked and can not be replied to.