wrkbrs
ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION - Duplicate headers received from server issue on chrome 본문
ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION - Duplicate headers received from server issue on chrome
zcarc 2019. 3. 19. 08:50Hi,
Recently, in my project while downloading some files(not on all files) i am getting exception on chrome, that say :
Duplicate headers received from server
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple Content-Disposition headers received. This is disallowed to protect against HTTP response-splitting attacks.
But when i download the same files on IE, Firefox and other browsers that causing exception, no problem occur it work like charm. ![]()
But its weird that why is chrome giving exception only on some files while downloading, then i searched, i found that new release of chrome has this problem. It seem like Content-disposition header become very strict and sensitive, in the spec that chrome uses.
Solution that worked for me to solve the problem :
Wrong :
response.setHeader(“Content-disposition”, “attachment; filename=${fileName}”)
Correct :
response.setHeader(“Content-disposition”, “attachment; filename=\””+fileName+”\””)
It worked for me. Hope it helps you also ![]()
Thanks,
Tarun Pareek
tarun@intelligrape.com
http://www.tothenew.com/blog/duplicate-headers-received-from-server-fix-for-chrome/
'Web dev' 카테고리의 다른 글
| Application/x-www-form-urlencode 및 content-type (0) | 2019.02.18 |
|---|---|
| 웹서버와 WAS(웹 어플리케이션 서버또는 컨테이너)의 차이 (0) | 2019.02.11 |