-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ssotomayor feature/532 content type hard not send #536
Ssotomayor feature/532 content type hard not send #536
Conversation
Seems in the same direction as this, however as i pointed out before, i'm not sure why is |
LGTM |
anyone else? |
LGTM. agree w/ @dougwilson's comment on the previous PR for this fix |
+1 |
1 similar comment
+1 |
LGTM |
@ssotomayor octet stream is a reasonable default I think, everything is an octet stream haha, but 👍 for being able to unset |
Just closed the other PR, i agree with the fixes. 👍 |
601f648
to
a6cb258
Compare
a6cb258
to
37e630d
Compare
Hi. Is there a way to respond with an undefined body and DO NOT set a content-type. I'm trying to make an internal redirect by nginx depend on the headers that returned from koa's backend. All I need is only one field I found the code where the magic happens application.js#L218: // status body
if (null == body) {
body = ctx.message || String(code);
if (!res.headersSent) {
ctx.type = 'text';
ctx.length = Buffer.byteLength(body);
}
return res.end(body);
} according to this I will always get non empty body? |
Right after posting prev comment I found that if I explicitly set body to null |
closes #532
closes #534
@dougwilson @fundon @ssotomayor how about this?