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

doc: fix mistake in http2stream.respondWithFile. #15501

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,8 @@ of the given file:

If an error occurs while attempting to read the file data, the `Http2Stream`
will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`
code.
code. If the `onError` callback is defined it will be called, otherwise
the stream will be destroyed.

Example using a file path:

Expand All @@ -1170,7 +1171,7 @@ server.on('stream', (stream) => {

stream.respondWithFile('/some/file',
{ 'content-type': 'text/plain' },
{ statCheck });
{ statCheck, onError });
});
```

Expand Down