Project

General

Profile

Actions

Defect #19398

closed

Failed to get attachment with Chinese filename.

Added by Alan Liu almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

  • No problem to get attachment with ASCII filename.
  • Failed to get attachment with Chinese filename. (Internal server error)
Environment:
  Redmine version                3.0.0.stable
  Ruby version                   1.9.3-p545 (2014-02-24) [i386-mingw32]
  Rails version                  4.2.0
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.7.5
  Git                            1.9.5
  Filesystem                     
Redmine plugins:
  redmine_issue_templates        0.1.0

Related issues

Is duplicate of Redmine - Defect #19374: MinGW thin and puma: Internal server error occoures when attachment file name contains non ASCIIClosed

Actions
Actions #1

Updated by Toshi MARUYAMA almost 10 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate of #19374.
Please contact bitnami team.

Actions #2

Updated by Toshi MARUYAMA almost 10 years ago

  • Is duplicate of Defect #19374: MinGW thin and puma: Internal server error occoures when attachment file name contains non ASCII added
Actions #3

Updated by Alan Liu almost 10 years ago

  • Status changed from Closed to Reopened
More background information:
  • OS: Windows Server 2008 R2 Standard SP1 (Traditional Chinese)
  • We do not use bitnami package.
  • The problem is caused after upgrading redmine from 2.6.1 to 3.0.0.

Thanks.

Actions #4

Updated by Toshi MARUYAMA almost 10 years ago

  • Status changed from Reopened to Closed

I cannot reproduce on Windows 8.1 Pro with webrick (#19374#note-3).
We cannot support individual web server and environment.

Actions #5

Updated by Alan Liu almost 10 years ago

It caused by Rails 4.2 (https://github.com/rails/rails/issues/19187 has a workaround, but I don't understand yet).

Actions #6

Updated by Alan Liu almost 10 years ago

  • Status changed from Closed to Reopened

Indeed, webrick has no problem.
But thin & puma do.
Why? webrick doesn't work with Rails 4.2?
(Sorry, I'm not a ruby programmer)

Actions #7

Updated by Toshi MARUYAMA almost 10 years ago

  • Status changed from Reopened to Closed

Alan Liu wrote:

It caused by Rails 4.2 (https://github.com/rails/rails/issues/19187 has a workaround, but I don't understand yet).

It is obvious thin problem.
You should report to thin, not to Rails.
Redmine is Rails app and does not depend on any web server.
We cannot do anything.

Actions #8

Updated by Alan Liu almost 10 years ago

The workaround (https://github.com/rails/rails/issues/19187): add some codes in C:\Ruby193\lib\ruby\gems\1.9.1\gems\actionpack-4.2.0\lib\action_dispatch\middleware\static.rb

          rescue EncodingError
            false

It will be (from line 31, EncodingError fixes my case)

      if match = paths.detect { |p|
        path = File.join(@root, p)
        begin
          File.file?(path) && File.readable?(path)
          rescue SystemCallError
            false
          rescue EncodingError
            false
        end
      }
Actions #9

Updated by Toshi MARUYAMA over 9 years ago

Actions #10

Updated by Alan Liu over 9 years ago

  • Status changed from Closed to Reopened

The problem comes back after upgrading to 3.0.2 & fixed by adding the same code in C:\Ruby193\lib\ruby\gems\1.9.1\gems\actionpack-4.2.1\lib\action_dispatch\middleware\static.rb

Environment:
  Redmine version                3.0.2.stable
  Ruby version                   1.9.3-p545 (2014-02-24) [i386-mingw32]
  Rails version                  4.2.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.7.5
  Git                            1.9.5
  Filesystem                     
Redmine plugins:
  redmine_issue_templates        0.1.0
Actions #11

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from Reopened to Closed
Actions #12

Updated by Toshi MARUYAMA over 9 years ago

You can use Rails 4-2-stable branch to change Gemfile.

-gem "rails", "4.2.1" 
+gem "rails", :github => 'rails/rails', :branch => '4-2-stable'

Actions

Also available in: Atom PDF