We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

HttpPlatformHandler and special characters in filenames using Redmine and ThinRSS

2 replies

Last post Apr 26, 2016 08:04 AM by Atmis46

  • HttpPlatformHandler and special characters in filenames using Redmine and Thin

    Apr 21, 2016 03:18 PM|Atmis46|LINK

    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

  • Re: HttpPlatformHandler and special characters in filenames using Redmine and Thin

    Apr 22, 2016 04:58 AM|lextm|LINK

    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.

    Lex Li
    Want to have a chat on the issues you meet? Find me at https://booktime.xyz/p/lextm
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: HttpPlatformHandler and special characters in filenames using Redmine and Thin

    Apr 26, 2016 08:04 AM|Atmis46|LINK

    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.