mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-26 04:10:18 +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/
|
||||
*/
|
||||
if strings.TrimSpace(contentType) == "" {
|
||||
contentType = "text/plain"
|
||||
contentType = "text/plain; charset=utf-8"
|
||||
}
|
||||
} else {
|
||||
disposition = "attachment"
|
||||
|
|
Loading…
Reference in a new issue