当前位置: 动力学知识库 > 问答 > 编程问答 >

parsing - What does this Content-Disposition header mean?

问题描述:

While developing an application that automatically download files, I came across the following URL, which is a file with the following content-disposition header:

Content-Disposition: attachment; filename="setup.exe"; filename*=utf-8''hdplayer_setup.exe

Does anybody know what the values of this header mean, in particular the second filename* parameter? Is it normal that it has two filename parameters?

Chrome, Firefox and Safari all parse this as just hdplayer_setup.exe (and not something broken like utf-8''hdplayer_setup.exe) so it seems to be a valid case. Any idea?

网友答案:

It's described in the Content-Disposition specification; see http://greenbytes.de/tech/webdav/rfc6266.html.

(to find the relevant spec you can use the IANA header field registry: http://www.iana.org/assignments/message-headers/message-headers.xhtml)

分享给朋友:
您可能感兴趣的文章:
随机阅读: