locked
HttpPlatformHandler and special characters in filenames using Redmine and Thin RRS feed

  • Question

  • User1469672466 posted

    Hi all,

    I am using Redmine 3.2 in production for around 3 month with HttpPlatformHandler, using Thin webserver in the background. It works well.

    The only issue I have is when I want to download a file attached in redmine with special characters in its name (like é è à - sorry I am French), the file downloads but the filename is broken. For example , character "é" become "é"

    If I connect directly to the thin instance in the background, then the file name is fine. It seems that the HttpPlatformHandler is breaking the filename.

    For those who are interested, here is my web.config relevant section :

            <handlers>
                    <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
            </handlers>
    	<httpPlatform stdoutLogEnabled="true" stdoutLogFile="c:\inetpub\redmine\log\rails.log" processPath="C:\Ruby200\bin\ruby.exe" arguments="C:\inetpub\redmine\GEM_HOME\bin\thin -e production -p %HTTP_PLATFORM_PORT% -c 'C:\inetpub\redmine' start" startupTimeLimit="120" startupRetryCount="5">
    		<environmentVariables>
    			<environmentVariable name="HOME" value="c:\inetpub\redmine" />
    			<environmentVariable name="HOMEDRIVE" value="c:" />
    			<environmentVariable name="HOMEPATH" value="\inetpub\redmine" />
    			<environmentVariable name="GEM_HOME" value="c:\inetpub\redmine\GEM_HOME" />
    			<environmentVariable name="GEM_PATH" value="c:\inetpub\redmine\GEM_HOME" />
    			<environmentVariable name="RAILS_ENV" value="production" />
    		</environmentVariables>            
            </httpPlatform>

    Any idea to solve this ?

    Thanks

    Pierre

    Thursday, April 21, 2016 3:18 PM

All replies

  • User690216013 posted

    Hi,

    This is really more of a browser side issue, which you might check this blog post for more details,

    https://blogs.msdn.microsoft.com/ieinternals/2010/06/07/downloads-and-international-filenames/

    The proposed solution (using UTF8 encoding) was still not quite mature in 2010 (the post date), but today it might work universally if you test.

    Friday, April 22, 2016 4:58 AM
  • User1469672466 posted

    Thanks a lot for your input, 

    I did some testing with different browser :

    • Internet Explorer keeps the right filename
    • Chrome transforms the "é" in "é"
    • Edge transforms the "é in "é"

    Connecting directly to Thin in the background works with any browser. And the browsers I tested works with any sites. To me, it looks like the issue is more server related than on the browser side.

    Tuesday, April 26, 2016 8:04 AM