mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2025-01-13 20:20:19 +01:00
Add charset to content type in getHandler (#545)
Add charset to content type in the getHandler function to fix CJK-letter related issues. If the content type is empty after trimming, set it to "text/plain; charset=utf-8".
This commit is contained in:
parent
a5dacb36a9
commit
e837849d44
1 changed files with 1 additions and 1 deletions
|
@ -1218,7 +1218,7 @@ func (s *Server) getHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
So add text/plain in this case to fix XSS related issues/
|
So add text/plain in this case to fix XSS related issues/
|
||||||
*/
|
*/
|
||||||
if strings.TrimSpace(contentType) == "" {
|
if strings.TrimSpace(contentType) == "" {
|
||||||
contentType = "text/plain"
|
contentType = "text/plain; charset=utf-8"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
disposition = "attachment"
|
disposition = "attachment"
|
||||||
|
|
Loading…
Reference in a new issue