You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameters filename and filename* differ only in that filename* uses the encoding defined in [RFC5987], allowing the use of characters not present in the ISO-8859-1 character set ([ISO-8859-1]).
Include a filename* parameter where the desired filename cannot be expressed faithfully using the filename form. Note that legacy user agents will not process this, and will fall back to using the "filename" parameter's content.
I'm opening this issue because:
I have found a bug
My Go version / GOPATH is: N/A
(N/A because I use the pre-compiled binary.)
How to Reproduce
touch 啊.txt # ISO/IEC 8859-1 (Latin 1) does not contain 啊 qrcp send 啊.txt
Then open the link in iOS Safari. You'll find
å.txt
.Reason
The filename is declared in UTF-8 as
\xe5\x95\x8a.txt
in the headerContent-Disposition
, but Safari interprets it in ISO/IEC 8859-1 aså\x95\x8a.txt
.Possible solution
Add
filename*
inContent-Disposition
.qrcp/server/server.go
Lines 222 to 223 in 8b35ad8
§4.3. Disposition Parameter: 'Filename' - RFC 6266:
Appendix D. Advice on Generating Content-Disposition Header Fields - RFC 6266:
An example in RFC 6266:
The syntax of the value of
filename*
is specified in RFC 5987 §3.2.1:I can make a PR if you want.
The text was updated successfully, but these errors were encountered: