This ones a little old but was high in the google ranking so I thought I would throw in the answer I found from Chrome, pdf display, Duplicate headers received from the server [Fixed]

Basically my problem also was that the filename contained commas. Do a replace on commas to remove them and you should be fine. My function to make a valid filename is below.

  1. public static string MakeValidFileName(string name)
  2. {
  3. string invalidChars = Regex.Escape(new string(System.IO.Path.GetInvalidFileNameChars()));
  4. string invalidReStr = string.Format(@"[{0}]+", invalidChars);
  5. string replace = Regex.Replace(name, invalidReStr, "_").Replace(";", "").Replace(",", "");
  6. return replace;
  7. }
  8. Coz the file name contains some invalid symbol, so it return the Duplicate headers received from server in Chrome, but IE is working ok.

Duplicate headers received from server的更多相关文章

  1. 配置 nginx server 出现nginx: [emerg] "root" directive is duplicate in /etc/nginx/server/blogs.conf:7

    在配置nginx 虚拟机时,执行 sudo /usr/sbin/nginx -t 报下面的错误: nginx: [emerg] nginx: configuration file /etc/nginx ...

  2. 【java报错】Unknown character set index for field '224' received from server.

    在捣腾免费数据库时,使用的一个数据库提供商的服务器使用utf8mb4编码,而我的jar包还是八百年前的.然后...然后就报错了... (1) MYSQL 5.5 之前, UTF8 编码只支持1-3个字 ...

  3. Unknown initial character set index '255' received from server. Initial client character 解决方法

    Unknown initial character set index '255' received from server. Initial client character set can be ...

  4. 使用mysql8.+版本,使用mybatis的代码生成工具:mybatis-generator连接数据库时Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.

    Error connecting to database: (using class org.gjt.mm.mysql.Driver)Unknown initial character set ind ...

  5. Unknown initial character set index '255' received from server. Initial client character set can be

    mysql的连接错误,在网上查找到是编码不匹配的原因, 直接在连接的URL后加上?useUnicode=true&characterEncoding=utf8就可以了

  6. java.sql.SQLException: Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.解决方案

    解决方案: 首先查看数据库的版本号,删除旧的jar包,将mysql-connector-java.jar更换成对应版本号 同时在连接数据库的url后加上?useUnicode=true&cha ...

  7. 解决mosh: Nothing received from server on UDP port 60001 环境: centos7.1

    主要问题在于有的教程使用iptables命令来开启对应端口, 但是centos7.1中虽然iptables仍然存在, 但是没有默认安装相关服务, 而是使用firewalld来管理防火墙. 所以我开始以 ...

  8. [bug] java.sql.SQLException: Unknown initial character set index '255' received from server. Initial cl...

    参考 https://www.jianshu.com/p/d86de6463cbd

  9. SQL Server Delete Duplicate Rows

    There can be two types of duplication of rows in a table 1. Entire row getting duplicated because th ...

随机推荐

  1. Android中Application全局方法(变量)的调用

    Application和Actovotu,Service一样是android框架的一个系统组件,当android程序启动时系统会创建一个 application对象,用来存储系统的一些信息.通常我们是 ...

  2. Canvas画椭圆的方法

    虽然标题是画椭圆,但是我们先来说说Canvas中的圆 相信大家对于Canvas画圆都不陌生   oGC.arc(400, 300, 100, 0, 2*Math.PI, false); 如上所示,直接 ...

  3. JS字符串常用方法

      // 来自 http://www.runoob.com/js/js-strings.html   var str01 = "odd open xboxone" , str02 ...

  4. Qt零基础教程(四) QWidget详解篇

    在博客园里面转载我自己写的关于Qt的基础教程,没次写一篇我会在这里更新一下目录: Qt零基础教程(四) QWidget详解(1):创建一个窗口 Qt零基础教程(四) QWidget详解(2):QWid ...

  5. SVN 不能提交, 看不到日志, 出现乱码. 解决方案.

    需要工具 sprite3: 点这里下载. 解决问题 如本文标题所写. 我遇到过几次一样的问题, 每次都很蛋疼的把目录重新检出, 浪费时间, 又伤了脾气. 下面是我在百度经验找到的一片帖子, 效果杠杠的 ...

  6. 4位bcd数转换为2进制数

    DATA   SEGMENTBUF    DW  1234HBUF1   DW  ?    ;2进制数放到buf1内存单元DATA   ENDSCODE   SEGMENTASSUME CS:CODE ...

  7. wariging for you oh~

  8. ORACLE数据库多表关联查询效率问题解决方案

    最近在做项目中遇到多表关联查询排序的效率问题(5张以上40W+数据的表),查询一次大概要20多秒,经过一番苦思冥想,处理方案如下: 1.软件设计初期,需要一对一关联的表应该设计在一张大表里,这样虽然字 ...

  9. javascript禁止输入数字

    function onkeypressIsNumber(){ var mainForm = document.mainForm;//mainForm是form表单的ID for(var i=0; i& ...

  10. 【leetcode】1. Two Sums

    题目 https://leetcode.com/problems/two-sum/   Given an array of integers, find two numbers such that t ...