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

Content-Type header is overridden by send defaults (doco issue?) #45

Closed
MilesMcBain opened this issue Mar 17, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@MilesMcBain
Copy link

I found this example in the doco for response headers:

app$get("/hello", \(req, res){
  res$header("Content-Type", "something")
  res$send("Using {ambiorix}!")
})

The problem is that send() has a default for the headers arg: content_html() which will replace the custom Content-Type header something with text/html.

@JohnCoene
Copy link
Collaborator

Yes, I just noticed that looking at your previous issue. Pushed a fix.

@JohnCoene JohnCoene added the bug Something isn't working label Mar 17, 2022
@JohnCoene
Copy link
Collaborator

Closing because this should be fixed in dev, feel free to reopen if it does not suit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants