我们正在升级到Rails 4.2 / Ruby 2.2(来自Rails 3.2-stable / Ruby 2.1.5),当我们意识到之前工作正常但现在没有。
从外部服务(Unity应用程序)接收二进制文件时出现以下错误:
ActionView::Template::Error: unknown encoding name - "utf-8"
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:210:in `find'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:210:in `block in tag_multipart_encoding'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:206:in `each'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:206:in `tag_multipart_encoding'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:74:in `block (2 levels) in parse'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:249:in `get_data'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:73:in `block in parse'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:56:in `loop'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart/parser.rb:56:in `parse'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/multipart.rb:25:in `parse_multipart'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/request.rb:373:in `parse_multipart'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/request.rb:207:in `POST'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/http/request.rb:308:in `POST'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/http/parameters.rb:14:in `parameters'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/http/filter_parameters.rb:37:in `filtered_parameters'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/views/exception_notifier/_request.text.erb:3:in `__var_www_my_dev_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier__request_text_erb___651057998597931832_70129559954080'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:145:in `block in render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:333:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:143:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/helpers/rendering_helper.rb:35:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb:9:in `block in __var_www_my_dev_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier_exception_notification_text_erb__4040125496682424407_70129560304780'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb:7:in `map'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb:7:in `__var_www_my_dev_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier_exception_notification_text_erb__4040125496682424407_70129560304780'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:145:in `block in render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:333:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/template.rb:143:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/template_renderer.rb:14:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:42:in `render_template'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:23:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/rendering.rb:100:in `_render_template'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/rendering.rb:83:in `render_to_body'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/rendering.rb:25:in `render'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/notifier.rb:87:in `block (2 levels) in exception_notification'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/collector.rb:26:in `custom'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/collector.rb:10:in `text'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/notifier.rb:87:in `block in exception_notification'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/base.rb:888:in `collect_responses'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/base.rb:828:in `mail'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier/notifier.rb:86:in `exception_notification'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in `process_action'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/base.rb:596:in `block in process'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/base.rb:593:in `process'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/base.rb:584:in `initialize'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/message_delivery.rb:25:in `new'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/message_delivery.rb:25:in `__getobj__'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/message_delivery.rb:34:in `message'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionmailer-4.2.0/lib/action_mailer/message_delivery.rb:105:in `deliver'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier.rb:42:in `rescue in call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/exception_notification-2.6.0/lib/exception_notifier.rb:34:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/etag.rb:24:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/conditionalget.rb:25:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:225:in `context'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:220:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
/home/www/my/dev/releases/20150205135055/config/initializers/quiet_assets.rb:6:in `call_with_quiet_assets'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/home/www/my/dev/releases/20150205135055/lib/ping_monitor.rb:14:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:535:in `process_client'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:610:in `worker_loop'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:491:in `spawn_missing_workers'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:141:in `start'
/var/www/my/dev/shared/bundle/ruby/2.1.0/gems/unicorn-4.4.0/bin/unicorn_rails:209:in `<top (required)>'
/var/www/my/dev/shared/bundle/ruby/2.1.0/bin/unicorn_rails:23:in `load'
/var/www/my/dev/shared/bundle/ruby/2.1.0/bin/unicorn_rails:23:in `<main>'
我们使用Unity方面的WWWForm.AddBinaryData。编码:text/html; charset=ASCII-8BIT
。例如:
form.AddBinaryData("image", jpegEncoder.GetBytes(), "imageName", "text/html; charset=ASCII-8BIT");
我们搜索了Rails更改日志,但我们没有看到任何新的相关内容。
最后我们转向了另一种方法:这个服务提供了一个Base64字符串,它工作正常(但是30%aprox。更轻),所以如果有人对它有任何想法会很好。
答案 0 :(得分:0)
如果其他人碰到这个,我已经分叉了Rack并修复了它,以免抛出这个错误:
https://github.com/ianhirschfeld/rack
基本上,我必须手动检查Unity的时髦“utf-8”字符串的编码,然后将其强制转换为Rack正确处理的UTF-8。