ensure we do not override charset for content type

This commit is contained in:
Sam
2018-01-25 18:43:32 +11:00
parent afaf9fd54c
commit adae963751
2 changed files with 5 additions and 5 deletions

View File

@ -69,8 +69,8 @@ module Hijack
Discourse::Cors.apply_headers(cors_origins, env, headers)
end
headers['Content-Type'] ||= response.content_type || "text/plain"
headers['Content-Length'] = body.bytesize
headers['Content-Type'] = response.content_type || "text/plain"
headers['Connection'] = "close"
status_string = Rack::Utils::HTTP_STATUS_CODES[response.status.to_i] || "Unknown"