Skip to content

Doc describes HTTP "abort" event, but not "aborted" #6925

Closed
@kemitchell

Description

@kemitchell
  • Version: 6.2.0
  • Platform: Linux 3.16.0-4-amd64 # 1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
  • Subsystem: HTTP

TL;DR: HTTP doc mentions 'abort' event, but not 'aborted'. The API emits both. Doc fix?

Current doc describes an 'abort' event on HTTP streams here. That doc was added in 2ca22aa, which closed #945. #945 seems to deal with the case where .abort() is called on a client only. It refers to nodejs/node-v0.x-archive#9278. As far as I can tell, current doc never mentions an 'aborted' event.

The HTTP client emits 'abort' from requests here.

The HTTP client also emits 'aborted' from the corresponding response (req.res) here.

The HTTP server emits 'aborted' from requests here.

'aborted' events make it to user space. raw-body, a dep of the popular body-parser, listens for it here.

A few questions:

  1. Is aborted intentionally undocumented? I see it mentioned in the CHANGELOG archives a couple of times from the 0.4.x days, here and originally (on Agent) here. Would the team welcome a doc patch mentioning it?
  2. Are abort and aborted intentionally distinct events?

_Be Warned! I believe this is my first issue on Node. I've read CONTRIBUTING and friends and done my best._

Thanks to the team!

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions