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

Overriding header, doesn't override #16

Open
Skeen opened this issue Dec 31, 2014 · 2 comments
Open

Overriding header, doesn't override #16

Skeen opened this issue Dec 31, 2014 · 2 comments

Comments

@Skeen
Copy link

Skeen commented Dec 31, 2014

When overriding the 'Content-Type' in a controller, by doing;

        response.setHeader("Content-Type", "application/json");

It doesn't actually override, it just appends another header to the response;

        Content-Length:23
        Content-Type:application/json
        Content-Type:text/html

The browser thereby interprets everything as html.

@Gregwar
Copy link
Owner

Gregwar commented Dec 31, 2014

Hello,
This is maybe a case problem
You define Content-Type and the default defined is Content-type (with a lowercase t)

@Gregwar
Copy link
Owner

Gregwar commented Dec 31, 2014

I've changed the default to Content-Type since this is more standard
Can you confirm me it's ok?
Maybe we could fix that, using map<string, pair<string, string> > with lowercase strings as keys for the map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants