How to download a file with plus symbol(+) filename in IIS?

Original post link:https://www.cnblogs.com/markjiang7m2/p/10823844.html

Today I get a ticket with our client that they could not download a file with plus symbol(+) filename, such as the filename is a+b.xls.

I have a try and get the 404 code as below.

Firstly, I consider if the file is deleted on the server by someone, so I remote to the server and have a check. But...all going well. The file is here.

Then I search if someone has had this problem on the Internet. A lot of answers say that + is a specific symbol in browser. It should be transcoded into %2B.

So I add the js code as below and try again.

fileName=fileName.replaceAll("\\+","%2B");
window.location.href = conf.webAPIRoot + fileName;

But...it doesn't work for me.

In another answer found in https://forums.iis.net/t/1226370.aspx. It should be set in IIS. After the setting, I try again and it works for me.

Request Filtering -> Edit Feature Settings -> Allow Double Escaping

How to download a file with plus symbol(+) filename in IIS?的更多相关文章

  1. Unity3D发布WebPlayer时Failed to download data file解决方案

    今天发布WebPlayer时, 发现直接打开html是可以正常运行的, 但是通过iis访问的话就会报错: Failed to download data file. 一开始以为是防火墙, 后来发现不是 ...

  2. Unity 3D本地公布WebPlayer版时"Failed to download data file"解决方式

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGlzZW55YW5n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  3. Pikachu-File Inclusion, Unsafe file download & Unsafe file upload

    Pikachu-File Inclusion, Unsafe file download & Unsafe file upload 文件包含漏洞 File Inclusion(文件包含漏洞)概 ...

  4. Download Excel file with Angular

    源码连接(编写中) 用Angular下载后台返回的Excel文件,用Blob实现,引用FileSaver.js 后台C#代码: [WebMethod] public static byte[] Cal ...

  5. C# download big file

    I had validated this.To download SSMS which is more than 500M+ static void Main(string[] args) { str ...

  6. how to download a file with Nodejs(without using third-party libraries)用node下载文件

    创建HTTP GET请求并将其管理response到可写文件流中: var http = require('http'); var fs = require('fs'); var file = fs. ...

  7. Unity 3D本地发布WebPlayer版时Failed to download data file解决方案

    遇到这个问题就是指Web服务器并没有支持这种*.unity3d文件类型.需要做的是在Web服务器中添加MIME类型: IIS 7 及以上版本: 在功能视图的IIS选项卡中: 双击打开MIME,选择添加 ...

  8. R包安装失败failed to download mirrors file

    在R console中使用install.packages()来安装第三方包时,会出现这样的错误: 即使我们选择的是China的镜像也解决不了问题. 这时候,可以先试试用IE打开上图中黑底部分的URL ...

  9. curl download zip file

    https://askubuntu.com/questions/285976/download-zip-file-with-curl-command

随机推荐

  1. 分享知识-快乐自己:idea的断点调试

    1:Step Over ,进入下一步,如果是方法,那就直接跳过(F8) 2:Step Into,进入下一步,如果是方法,就进入方法内部,但是不会进入jdk封装的方法.(F7) 3:Force Step ...

  2. 基于T4的生成方式

    一.什么是T4模板 T4是对“Text Template Transformation Toolkit”(4个T)的简称.是一个基于文本文件转换的工具包.T4的核心是一个基于“文本模板”的转换引擎(以 ...

  3. MicroMessage的动态操作(第二步)

    现在开始将静态页面转化成动态页面.将页面上的信息转化成 数据库提供的信息. 建立jdbc获取数据库连接,并设置一个查询sql语句,查出所有结果.但是因为查询结果rs包含全表信息,是多行. 为了保存查询 ...

  4. 【转】C++11 标准新特性:Defaulted 和 Deleted 函数

    原文链接http://www.ibm.com/developerworks/cn/aix/library/1212_lufang_c11new/ 本文将介绍 C++11 标准的两个新特性:defaul ...

  5. STL stl_construct.h

    stl_construct.h // Filename: stl_construct.h // Comment By: 凝霜 // E-mail: mdl2009@vip.qq.com // Blog ...

  6. C++ template 声明与定义

    今天编码的时候,发现了一个错误,就是模板代码在链接的时候找不到方法. 情况大概如下: 在 "Manager.h" 中 class Manager { public: templat ...

  7. 【leetcode刷题笔记】Integer to Roman

    Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...

  8. NOI2018网络同步赛游记

    Day1 t1是一道NOI选手眼中的送分题,对于我来说还是有难度的,用了个把小时想了出来可持久化并查集的做法,最后一个点被卡常.赛后才发现Kruskal重构树是这样的简单.t2.t3由于我真的是太弱了 ...

  9. java静态方法(变量)、非静态方法(变量)区别

    java静态方法.静态变量在调用时生成唯一标识,即在内存中给定一个静态位子,这样在调用时可以直接找到,而且会节省内存.但如果声明的静态方法.静态变量过多,会占用过多内存,有可能导致内存溢出. 非静态方 ...

  10. File:isctype.c Line 68

    刚接触DSP,拿来别人的代码,编译时,发现如下错误: 百思不得琪姐,一番调查之后,发现自己的工程worksapce中有中文路径,怎一个fuck了得.