Page MenuHomePhabricator

File Extension Changes while Downloading
Closed, ResolvedPublic

Assigned To
Authored By
OCram
Feb 20 2017, 11:13 AM
Referenced Files
F3118735: OS-SampleFile.os
Feb 21 2017, 11:02 AM
F3110751: pasted_file
Feb 20 2017, 11:13 AM
F3110739: pasted_file
Feb 20 2017, 11:13 AM

Description

Environment

  • phabricator 9f3cde4db7654499c1ed565fbf048b8e8710f70a (Sat, Feb 18)
  • arcanist 3b6b523c2b236e3724a1e115f126cb6fd05fa128 (Sat, Feb 18)
  • phutil ef580c9ccc219b9871588921f545a7609d2b01dc (Sun, Feb 19)
  • System:
    • Centos7
    • Apache: httpd-2.4.6-40.el7.centos.4.x86_64
    • DB: mariadb-server-5.5.50-1.el7_2.x86_64
    • PHP:
      • php-pear-1.9.4-21.el7.noarch
      • php-devel-5.4.16-36.3.el7_2.x86_64
      • php-mbstring-5.4.16-36.3.el7_2.x86_64
      • php-common-5.4.16-36.3.el7_2.x86_64
      • php-pdo-5.4.16-36.3.el7_2.x86_64
      • php-5.4.16-36.3.el7_2.x86_64
      • php-process-5.4.16-36.3.el7_2.x86_64
      • php-ldap-5.4.16-36.3.el7_2.x86_64
      • php-cli-5.4.16-36.3.el7_2.x86_64
      • php-mysql-5.4.16-36.3.el7_2.x86_64
      • php-gd-5.4.16-36.3.el7_2.x86_64
      • php-xml-5.4.16-36.3.el7_2.x86_64

Description

We often add *.os files into maniphest tasks. These files comes from an internal document managment system. Apache is configured to handle these files as attachments:

<LocationMatch "\.(?i:os)$">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
</LocationMatch>

These settings worked for about 2 years now.

But now I noticed some weird behavior while downloading files with '*.os' extension. While downloading files with this extension via chrome the extension changes to *.txt

I've already tested it with a bank new system + apache 2.4 and these setting. It works. So it seems to be a problem with phabricator and how it delivers the files.

Reproduction Steps

  • Browse to a maniphest tasks containing a *.os file.
  • Download the file using the Link it fails:

pasted_file (703×781 px, 31 KB)

  • Downloading the file in the files app it works:

pasted_file (707×1 px, 87 KB)

  • OS File for testing:


(Seems to work here) ...very strange 😠

Event Timeline

Removed apache settings:

<LocationMatch "\.(?i:os)$">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
</LocationMatch>

Works now for Downloading. Doesn't work with 'View File' action in Files.

If this is the supposed behavior it is fine for me.

epriestley claimed this task.
epriestley added a subscriber: epriestley.

Sounds like this is resolved.