Project

General

Profile

Actions

Defect #27798

closed

Error 404 occurred when opening attached file having Japanese (multibyte) file name

Added by Anonymous over 6 years ago. Updated over 6 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

This problem sometimes occurs.
The wrong URL "%E7%94�%E8�%8B%E6%9B�" is "%E7%94(DCB3)%E8(DCAB)%8B%E6%9B(DCB8)".
And that must be "%E7%94%B3%E8%AB%8B%E6%9B%B8".
It seems that the "%" character of the URL is changing to binary \xdc.
See these logs below.

  • Logs on success

*Apache log (logs/accsss.log)

10.10.45.59 - - [13/Dec/2017:10:14:45 +0900] "GET /redmine/attachments/3054/PJ%E7%94%B3%E8%AB%8B%E6%9B%B8.txt HTTP/1.1" 200 40204

Redmine log (log/production.log)

Started GET "/redmine/attachments/3054/PJ%E7%94%B3%E8%AB%8B%E6%9B%B8.txt" for 127.0.0.1 at 2017-12-13 10:14:45 +0900
Processing by AttachmentsController#show as HTML
  Parameters: {"id"=>"3054", "filename"=>"PJ申請書.txt"}
  Current user: admin (id=1)
  Rendered common/_file.html.erb (0.0ms)
  Rendered layouts/_file.html.erb (15.6ms)
  Rendered attachments/file.html.erb within layouts/base (15.6ms)
  Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.0ms)
  Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.0ms)
  Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (0.0ms)
Completed 200 OK in 78ms (Views: 52.3ms | ActiveRecord: 15.6ms)

  • Logs on failure

Apache log (logs/accsss.log)

10.10.45.59 - - [13/Dec/2017:10:14:39 +0900] "GET /redmine/attachments/3054/PJ%E7%94%B3%E8%AB%8B%E6%9B%B8.txt HTTP/1.1" 404 12492

Redmine log (log/production.log)

Started GET "/redmine/attachments/3054/PJ%E7%94�%E8�%8B%E6%9B�.txt" for 127.0.0.1 at 2017-12-13 10:14:39 +0900
Processing by AttachmentsController#show as HTML
  Parameters: {"id"=>"3054", "filename"=>"PJ\xE7\x94\xB3\xE8\xAB\x8B\xE6\x9B\xB8.txt"}
  Current user: admin (id=1)
  Rendered common/error.html.erb within layouts/base (0.0ms)
  Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.0ms)
  Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.0ms)
  Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (15.6ms)
Filter chain halted as :find_attachment rendered or redirected
Completed 404 Not Found in 47ms (Views: 36.4ms | ActiveRecord: 0.0ms)

Environment:
  Redmine version                3.4.2.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x64-mingw32]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.9.5
  Filesystem                     
Redmine plugins:
  clipboard_image_paste          1.12
  easy_baseline                  1.4
  easy_gantt                     1.10
  easy_gantt_pro                 1.10
  redmine_dmsf                   1.5.9
  redmine_graphs                 0.1.0
  redmine_issue_templates        0.1.8
  redmine_issues_summary_graph   0.0.9
  redmine_issues_tree            0.0.10
  redmine_monitoring_controlling 0.1.1
  redmine_nikoca_re              0.2.0
  sidebar_hide                   0.0.8

Other environment:

OS:  Windows 2008 R2
Web server:  Apache 2.2.32
Additional gems:
  thin (1.7.2)
  thin_service (0.0.7)

Actions #1

Updated by Toshi MARUYAMA over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Needs feedback

Do you reproduce on webrick and without plugins?

Actions #3

Updated by Anonymous over 6 years ago

Your question was very helpful.
Access failed sometimes via Apache, but succeeded via WEBrick and Thin directly.
And I could find some mistake in RewriteRule in httpd.conf.
Redmine works fine now.

Thank you!

By the way...
I'm also "nomeshikoki" :)

Actions #4

Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Thank you for your feedback.

tacafumi tadocolo wrote:

By the way...
I'm also "nomeshikoki" :)

Oh, yeah!

Actions

Also available in: Atom PDF