Open ttys3 opened 1 year ago
resolve https://github.com/subhra74/xdm/issues/1012
fix: fix GetContentDispositionFileName can not correctly handle RFC 6266 specific filename* param
filename*
Refs: https://www.rfc-editor.org/rfc/rfc6266#section-4.3
example content-disposition header from Sharepoint storage:
content-disposition
content-disposition: attachment;filename*=utf-8''foo%2Erar;filename="foo.rar"
https://httpwg.org/specs/rfc6266.html#header.field.definition
https://httpwg.org/specs/rfc6266.html#disposition.parameter.filename
https://www.iana.org/assignments/cont-disp/cont-disp.xhtml
according https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives
The parameters filename and filename* differ only in that filename* uses the encoding defined in RFC 5987. When both filename and filename* are present in a single header field value, filename* is preferred over filename when both are understood.
filename
Thnx for this one I confirm it now works like expected
resolve https://github.com/subhra74/xdm/issues/1012
fix: fix GetContentDispositionFileName can not correctly handle RFC 6266 specific
filename*
paramRefs: https://www.rfc-editor.org/rfc/rfc6266#section-4.3
example
content-disposition
header from Sharepoint storage:https://httpwg.org/specs/rfc6266.html#header.field.definition
https://httpwg.org/specs/rfc6266.html#disposition.parameter.filename
https://www.iana.org/assignments/cont-disp/cont-disp.xhtml
according https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives
The parameters
filename
andfilename*
differ only in thatfilename*
uses the encoding defined in RFC 5987. When bothfilename
andfilename*
are present in a single header field value,filename*
is preferred overfilename
when both are understood.