I’m running Mongrel (and the same thing happens in Webrick mode).
I’m uploading a file via form, and I’m getting the following error:
Error calling Dispatcher.dispatch #<EOFError: bad content body>
/usr/local/lib/ruby/1.8/cgi.rb:984:in read_multipart' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/cgi_ext/raw_post_data_fix.rb:38:in
initialize_query’
I’m able to upload files fine from other forms in the site, but when I
upload on a specific page, I get that error.
Here is the generated html source for the upload form:
“frame” is an iframe, but I get the same error posting without the
target designation.
The action in the controller does nothing:
def ajax_like_approve_with_alternate
# Do stuff with params[:uploaded_file]
#data = ClData.find( params[:id] )
#responds_to_parent do
# render :update do |page|
# page << "ResponseHandler( #{params[:id]}, 'awa', 1 )"
# end
#end
end
The only difference I can see between other pages on the site is that
other pages don’t specify a target for the form (which again, doesn’t
help the problem), and the page that is causing the errors has many
forms on it (NOTE: I’ve checked to be sure none of them are embedded
within another).