Skip to content

res.finished starts as true for HEAD requests from CURL #24283

Description

@ronag

For some reason this fails... which is rather strange?

const assert = require('assert');
const http2 = require('http2');
const fixtures = require('../common/fixtures');

http2
  .createSecureServer({
    allowHTTP1: true,
    key: fixtures.readKey('agent1-key.pem'),
    cert: fixtures.readKey('agent1-cert.pem'),
    ca: fixtures.readKey('ca1-cert.pem')
  })
  .on('request', (req, res) => {
    assert.ok(!res.finished) // AssertionError
  })
  .listen(5001)
curl --head -k https://localhost:5001

Activity

  1. ronag commented on Nov 10, 2018

    @ronag
    MemberAuthor

    Might be a http2 vs http discrepancy?

  2. Trott commented on Nov 11, 2018

    @Trott
    Member

    @nodejs/http2

  3. ronag commented on Nov 11, 2018

    @ronag
    MemberAuthor

    It seems stream._writableState.ended is true for headRequest.

  4. added
    http2Issues and PRs related to the http2 subsystem.
    on Nov 11, 2018
  5. ronag commented on Jun 8, 2019

    @ronag
    MemberAuthor

    Duplicate #24743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    http2Issues and PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions