Forum: Ruby on Rails File Upload Problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Evan H. (Guest)
on 2006-03-15 11: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:

or if using fastcgi:

FastCGI: comm with server "/home/emh/"
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...
Evan H. (Guest)
on 2006-03-15 12: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.