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

charset set in Content-Type when it shouldn't be #164

Closed
geoffsmith82 opened this issue Nov 20, 2018 · 2 comments
Closed

charset set in Content-Type when it shouldn't be #164

geoffsmith82 opened this issue Nov 20, 2018 · 2 comments

Comments

@geoffsmith82
Copy link
Contributor

In MVCFramework.Router.pas when the MVCProduces attribute is not set on a Controller method but the Content-Type field is used to set it, the charset is set to utf-8 even for binary types .. ie.

Content-Type: application/zip; charset=utf8

I eventually found that setting
Config[TMVCConfigKey.DefaultContentCharset] := '';
solved my problem, but it was not obvious that is was the solution. Could it be changed so that the charset is accessible to be set like the Content-Type is and/or charset is cleared when the Content-Type is set.

@danieleteti danieleteti added the accepted Issue has been accepted and inserted in a future milestone label Nov 21, 2018
@danieleteti danieleteti added this to the 3.1 (helium) milestone Nov 21, 2018
@danieleteti danieleteti removed the accepted Issue has been accepted and inserted in a future milestone label Jan 8, 2019
@danieleteti
Copy link
Owner

Did you tried SendStream or SendFile ?

@danieleteti danieleteti removed this from the 3.1 (lithium) milestone Jan 8, 2019
@danieleteti danieleteti added this to the 3.1.1 (beryllium) milestone Feb 24, 2019
@danieleteti
Copy link
Owner

Fixed in 3.1.1-beryllium-RC3

danieleteti added a commit that referenced this issue Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants