I have run into a road block with my RoR project. The app works fine
without SSL but when I try to upload a file with the site running in
HTTPS, cgi.rb throws an EOFError:
[13/Mar/2006:23:05:48 :: 22982] Dispatcher failed to catch: bad content
body (EOFError) /usr/lib/ruby/1.8/cgi.rb:981:in
read_multipartâ?? /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/cgi_ext/raw_post_data_fix.rb:20:ininitialize_queryâ?? /usr/lib/ruby/1.8/cgi.rb:2270:in
initializeâ?? (eval):16:ininitializeâ?? /usr/lib/ruby/1.8/fcgi.rb:600:in
process!â?? /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:inprocess!â?? /var/www/familygrove/public/dispatch.fcgi:26
almost killed by this error
My environment is Ubuntu 6.04, Ruby 1.8.2 and Rails 1.0.0.
Here’s the HEAD from cgi.rb read_multipart function:
def read_multipart(boundary, content_length) params = Hash.new() boundary = "--" + boundary buf = "" bufsize = 10 * 1024 # start multipart/form-data stdinput.binmode if defined? stdinput.binmode boundary_size = boundary.size + EOL.size content_length -= boundary_size status = stdinput.read(boundary_size) if nil == status raise EOFError, "no content body" elsif boundary + EOL != status raise EOFError, "bad content body" end
Are there any known issues with HTTPS upload and the above code block?
Anyone know of a workaround?