| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
/cc @apapirovski @a0viedo @mcollina @trivikr I'm not sure the best way to word this or how to make it more explicit. |
Sorry, something went wrong.
| // Create a plain-text HTTP/2 server | ||
| // Create a simple HTTP/2 server | ||
| // This will not work in most browsers, | ||
| // Try http2.createSecureServer instead |
There was a problem hiding this comment.
A nit: // Try -> // try after the comma above?
Sorry, something went wrong.
There was a problem hiding this comment.
Any thoughts on usage of periods . anywhere?
Sorry, something went wrong.
There was a problem hiding this comment.
Let's see what others think, I am not a native speaker)
Sorry, something went wrong.
There was a problem hiding this comment.
I added periods.
Sorry, something went wrong.
| Core API: | ||
| The following illustrates a simple HTTP/2 server using the Core API. | ||
| Note the use of [`http2.createSecureServer()`][] since HTTPS is required | ||
| for [most web browsers](https://caniuse.com/#feat=http2). |
There was a problem hiding this comment.
No browsers support unencrypted HTTP2 (HTTP/2 spec FAQ)
You can change this to "since no browsers support unencrypted HTTP2" with the link to HTTP/2 spec FAQ
Ditto for line 1735
Sorry, something went wrong.
| const http2 = require('http2'); | ||
|
|
||
| // Create a plain-text HTTP/2 server | ||
| // Create a simple HTTP/2 server |
There was a problem hiding this comment.
I think the term plain-text is more specific.
Sorry, something went wrong.
There was a problem hiding this comment.
How about using the term unencrypted over plain-text?
Sorry, something went wrong.
There was a problem hiding this comment.
I'd be good with that.
Sorry, something went wrong.
There was a problem hiding this comment.
Sounds good to me 👍
Sorry, something went wrong.
| const http2 = require('http2'); | ||
|
|
||
| // Create a plain-text HTTP/2 server | ||
| // Create a simple HTTP/2 server |
There was a problem hiding this comment.
can you restore this to plain-text?
Sorry, something went wrong.
There was a problem hiding this comment.
I changed to unencrypted
Sorry, something went wrong.
|
Thanks for the comments. I pushed an update with the revised docs. |
Sorry, something went wrong.
| [Compatibility API]: #http2_compatibility_api | ||
| [HTTP/1]: http.html | ||
| [HTTP/2]: https://tools.ietf.org/html/rfc7540 | ||
| [HTTP2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption |
There was a problem hiding this comment.
A nit: we usually sort references in ASCII order, so this should go after [HTTP2 Settings Object] ref.
Sorry, something went wrong.
There was a problem hiding this comment.
I fixed this by renaming to [HTTP/2 Unencrypted] since its not linking to a section anchor but its more like the external link above.
Sorry, something went wrong.
| [`tls.connect()`]: tls.html#tls_tls_connect_options_callback | ||
| [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener | ||
| [error code]: #error_codes | ||
| [error code]: #error_codes No newline at end of file |
There was a problem hiding this comment.
A nit: missing line break at the end of the file.
Sorry, something went wrong.
There was a problem hiding this comment.
Oops! Fixed! 🔧
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| The following illustrates a simple HTTP/2 server using the Core API. | ||
| Since no browsers support [unencrypted HTTP/2][HTTP/2 Unencrypted], | ||
| the use of [`http2.createSecureServer()`][] is preferred. | ||
|
|
There was a problem hiding this comment.
I would say something like...
Since there are no browsers known that support [unencrypted HTTP/2](HTTP/2 Unencrypted), the use of [`http2.createSecureServer()`][] is necessary when communicating with browser clients.
Using Unencrypted HTTP/2 would actually be the preference when running purely within internal environments with non-browser clients.
Sorry, something went wrong.
There was a problem hiding this comment.
Okie dokie 👍
Sorry, something went wrong.
| instances. | ||
|
|
||
| Since no browsers support [unencrypted HTTP/2][HTTP/2 Unencrypted], | ||
| the use of [`http2.createSecureServer()`][] is preferred. |
There was a problem hiding this comment.
Again,
Since there are no browsers known that support [unencrypted HTTP/2](HTTP/2 Unencrypted), the use of [`http2.createSecureServer()`][] is necessary when communicating with browser clients.
Sorry, something went wrong.
There was a problem hiding this comment.
Okie dokie 👍
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| The following illustrates a simple, plain-text HTTP/2 server using the | ||
| Core API: | ||
| The following illustrates a simple HTTP/2 server using the Core API. | ||
| Since there are no browsers known that support [unencrypted HTTP/2](HTTP/2 Unencrypted), |
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
Whoa good catch, I just copy/pasted the code review comment so there must have been a typo.
Sorry, something went wrong.
| Returns a `net.Server` instance that creates and manages `Http2Session` | ||
| instances. | ||
|
|
||
| Since there are no browsers known that support [unencrypted HTTP/2](HTTP/2 Unencrypted), |
There was a problem hiding this comment.
The same.
Sorry, something went wrong.
|
Thanks for all the feedback! I think I got it right this time 🤞 |
Sorry, something went wrong.
There was a problem hiding this comment.
Confirmed the doc edits are appearing correctly at https://github.com/styfle/node/blob/patch-2/doc/api/http2.md
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #19476 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in cb69a7d Thank you for the patience! |
Sorry, something went wrong.
PR-URL: #19476 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#19476 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
The docs were not clear for new users of HTTP/2 requires TLS in most browsers.
This adds a couple notes to direct new users to http2.createSecureServer().
Fixes #19406
Checklist
Affected core subsystem(s)
doc