Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

Commit

Permalink
http2: multiple updates
Browse files Browse the repository at this point in the history
* edge case errors, consistency, nits
* ServerHttp2Stream.headersSent property, proxied by Http2ServerResponse
  This avoids brittle abstraction-leaking to guess whether or not
  ServerHttp2Stream.respond() may still be called on HEAD requests
  where the stream is ended before headers are sent.
* docs for ServerHttp2Stream headersSent & pushAllowed (Squash)
* var to const/let
* consistent log message prefix
* doc fix & test for http2.connect() optional arguments
* eslint object-curly-spacing: ["error", "always"] (Squash)

PR-URL: #167
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
sebdeckers authored and jasnell committed Jul 12, 2017
1 parent 5473c35 commit 1ef9111
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 90 deletions.
23 changes: 22 additions & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,27 @@ added: REPLACEME

Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.

#### http2stream.headersSent
<!-- YAML
added: REPLACEME
-->

* Value: {boolean}

Boolean (read-only). True if headers were sent, false otherwise.

#### http2stream.pushAllowed
<!-- YAML
added: REPLACEME
-->

* Value: {boolean}

Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
client's most recent `SETTINGS` frame. Will be `true` if the remote peer
accepts push streams, `false` otherwise. Settings are the same for every
`Http2Stream` in the same `Http2Session`.

#### http2stream.pushStream(headers[, options], callback)
<!-- YAML
added: REPLACEME
Expand Down Expand Up @@ -1367,7 +1388,7 @@ server.on('stream', (stream, headers) => {
server.listen(80);
```

### http2.connect(authority, options, listener)
### http2.connect(authority[, options][, listener])
<!-- YAML
added: REPLACEME
-->
Expand Down
Loading

0 comments on commit 1ef9111

Please sign in to comment.