Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat attachment filename support utf8 #3071

Merged
merged 1 commit into from Mar 17, 2022
Merged

Conversation

a-wing
Copy link
Contributor

@a-wing a-wing commented Mar 9, 2022

attachment filename support utf8

Content-Disposition: attachment; filename="new_filename.go"
Content-Disposition: attachment; filename*=UTF-8''new%F0%9F%A7%A1_filename.go

golang.org/x/exp/utf8string need golang 1.18

https://datatracker.ietf.org/doc/html/rfc5987
https://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
https://stackoverflow.com/questions/53069040/checking-a-string-contains-only-ascii-characters

@codecov
Copy link

codecov bot commented Mar 12, 2022

Codecov Report

Merging #3071 (405fee4) into master (3757142) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3071   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files          41       41           
  Lines        3090     3100   +10     
=======================================
+ Hits         3052     3062   +10     
  Misses         26       26           
  Partials       12       12           
Flag Coverage Δ
go-1.13 98.77% <100.00%> (+<0.01%) ⬆️
go-1.14 98.61% <100.00%> (+<0.01%) ⬆️
go-1.15 98.61% <100.00%> (+<0.01%) ⬆️
go-1.16 98.61% <100.00%> (+<0.01%) ⬆️
go-1.17 98.51% <100.00%> (+<0.01%) ⬆️
macos-latest 98.77% <100.00%> (+<0.01%) ⬆️
nomsgpack 98.75% <100.00%> (+<0.01%) ⬆️
ubuntu-latest 98.77% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
context.go 97.90% <100.00%> (+0.01%) ⬆️
utils.go 97.00% <100.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3757142...405fee4. Read the comment docs.

@appleboy appleboy added this to the v1.8 milestone Mar 12, 2022
@appleboy appleboy requested a review from thinkerou Mar 12, 2022
@appleboy appleboy merged commit 8860527 into gin-gonic:master Mar 17, 2022
26 checks passed
daheige pushed a commit to daheige/gin that referenced this issue Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants