-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
http/2 compat will emit finish before end() for HEAD requests #24742
Labels
http2
Issues or PRs related to the http2 subsystem.
Comments
Probably duplicate #24743 |
@ronag Please correct me if I'm wrong but I think this issue and the duplicate one both are fixed now. I tried reproducing them using the code below. The code passes. const http = require('http');
const assert = require('assert');
const server = http.createServer();
server.listen(0);
server.on('listening', (res) => {
const clientrequest = http.request({
port: server.address().port,
method: 'HEAD',
path: '/'
});
clientrequest.end();
});
server.on('request', (req, res) => {
// #24743
assert(!res.finished);
// #24742
res.on('finish', () => { console.log('finish') });
res.on('close', () => { console.log('close') });
res.end();
server.close();
}); |
@ronag is this still an issue? |
Probably not. Though I don't remember what caused the original issue and what might have fixed it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i.e. this breaks for HEAD requests:
The text was updated successfully, but these errors were encountered: