| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
version fields for additions/removals/changes should always have a value of REPLACEME
Sorry, something went wrong.
There was a problem hiding this comment.
There should only be one space between 'string' and 'or' here.
Sorry, something went wrong.
There was a problem hiding this comment.
be an a -> be a
Sorry, something went wrong.
There was a problem hiding this comment.
s/if/If/
Sorry, something went wrong.
There was a problem hiding this comment.
s/options/`options`/
Sorry, something went wrong.
|
Notes:
|
Sorry, something went wrong.
|
Doc section headings affect autogenerated sections ids for section links. So each time we change a heading, we need to grep for the old hash and update all found instances. Currently, it seems these instances need to be updated (with #http_http_request_url_options_callback): https://github.com/nodejs/node/blame/8ab7ea6eed76d069dfd82684e2157e7d88badebf/doc/api/http.md#L2068 https://github.com/nodejs/node/blame/67790962daccb5ff19c977119d7231cbe175c206/doc/api/https.md#L365 |
Sorry, something went wrong.
|
Also these for https change (with #https_https_url_request_options_callback): https://github.com/nodejs/node/blame/67790962daccb5ff19c977119d7231cbe175c206/doc/api/https.md#L367 |
Sorry, something went wrong.
There was a problem hiding this comment.
I feel like this should be something like: input[, options][, callback] to show that at least one argument is required and not that both are optional with perhaps additional explanation below or follow in the footsteps of documented functions like this and show multiple signatures for the same function. I'm not sure if we have a standard yet for showing multiple signatures for more complicated situations.
Ditto for https.request.
Sorry, something went wrong.
There was a problem hiding this comment.
I followed the example of response.end.
I don't think it is a good idea to describe the syntax in a way that implies that url is required even if subsequent text says to ignore that implication.
Technically, nothing is required, as http.request() would be evaluated the same as http.request({ }).
Sorry, something went wrong.
There was a problem hiding this comment.
Also, http.request accepts a url parameter despite ClientRequest giving this argument a different name so as to not collide with the url package which was previously required. Chose the name input based on Request().
Sorry, something went wrong.
There was a problem hiding this comment.
FWIW, we have a section with various signatures:
https://nodejs.org/docs/latest/api/console.html#console_new_console_stdout_stderr_ignoreerrors
https://nodejs.org/docs/latest/api/console.html#console_new_console_options
Sorry, something went wrong.
There was a problem hiding this comment.
Ditto about REPLACEME
Sorry, something went wrong.
There was a problem hiding this comment.
I think it would be better to have a real test by setting up a local http.Server on a random port, connecting to that, and verifying the path and such inside the incoming connection handler (wrapped in a common.mustCall()).
Sorry, something went wrong.
There was a problem hiding this comment.
Allow URL and options to be passed to `http.request()`.?
Sorry, something went wrong.
There was a problem hiding this comment.
be an a -> be a
Sorry, something went wrong.
There was a problem hiding this comment.
Allow URL and options to be passed to `https.request()`.?
Sorry, something went wrong.
|
If we go with providing multiple signatures in the documentation, there is no need to update the autogenerated sections ids for section links. I still have a mild preference and believe that there is precedence for a function with all optional arguments, but I sense that I'm in the minority with that opinion. Also, I noted that http.get and https.get have the same signature as their corresponding .request methods, so I updated them too to handle a separate url argument. The test case provided makes use of http.get(), which calls http.request(), which calls ClientRequest() . |
Sorry, something went wrong.
|
@nodejs/http |
Sorry, something went wrong.
There was a problem hiding this comment.
http -> https
Sorry, something went wrong.
There was a problem hiding this comment.
Should there also be 2 headings?
Sorry, something went wrong.
There was a problem hiding this comment.
Other signatures usually use fewer spaces, like (url[, options][, callback]).
Sorry, something went wrong.
There was a problem hiding this comment.
I think this could be moved to the server's request handler.
Sorry, something went wrong.
There was a problem hiding this comment.
I think this would make this PR a semver-major change, and I'd like to avoid that if possible. How about we just remove this check?
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
|
I started to look at the backport (rubys@cbe9d7d), and found that the test/parallel/test-http-invalid-urls.js test was failing. While looking into that failure, I noticed that the https support is incomplete (there should have been a small change to lib/https.js, but it isn't there). I'll look into completing this change (with a new pull request, and ensuring that there is a test for https), and then circle back to backport both to 10.x. |
Sorry, something went wrong.
Fixes: nodejs#20795 PR-URL: nodejs#21616 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fixes: #20795 PR-URL: #21616 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Backport-PR-URL: #21880 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Notable changes: * deps: Upgrade V8 from 6.7 to 6.8 (Michaël Zasso) #21079 * Memory reduction and performance improvements, details at: https://v8project.blogspot.com/2018/06/v8-release-68.html * fs: Implement a fs.mkdir() recursive option, similar to the mkdirp npm package or mkdir -p on the command line (Benjamin Coe) #21875 * http: http.get() and http.request() (and https variants) can now accept three arguments to allow for a URL and an options object (Sam Ruby) #21616
Notable changes: * deps: Upgrade V8 from 6.7 to 6.8 (Michaël Zasso) #21079 * Memory reduction and performance improvements, details at: https://v8project.blogspot.com/2018/06/v8-release-68.html * fs: Implement a fs.mkdir() recursive option, similar to the mkdirp npm package or mkdir -p on the command line (Benjamin Coe) #21875 * http: http.get() and http.request() (and https variants) can now accept three arguments to allow for a URL and an options object (Sam Ruby) #21616 * Added new collaborators * Sam Ruby (https://github.com/rubys) * George Adams (https://github.com/gdams)
Notable changes:
* buffer:
* Fix out-of-bounds (OOB) write in `Buffer.write()` for UCS-2 encoding
(CVE-2018-12115)
* Fix unintentional exposure of uninitialized memory in `Buffer.alloc()`
(CVE-2018-7166)
* deps:
* Upgrade to OpenSSL 1.1.0i, fixing:
- Client DoS due to large DH parameter (CVE-2018-0732)
- ECDSA key extraction via local side-channel (CVE not assigned)
* Upgrade V8 from 6.7 to 6.8 (Michaël Zasso) #21079
- Memory reduction and performance improvements, details at:
https://v8project.blogspot.com/2018/06/v8-release-68.html
* http: `http.get()` and `http.request()` (and `https` variants) can now accept
three arguments to allow for a `URL` _and_ an `options` object
(Sam Ruby) #21616
* Added new collaborators
* Sam Ruby (https://github.com/rubys)
* George Adams (https://github.com/gdams)
Notable changes:
* buffer:
* Fix out-of-bounds (OOB) write in `Buffer.write()` for UCS-2 encoding
(CVE-2018-12115)
* Fix unintentional exposure of uninitialized memory in `Buffer.alloc()`
(CVE-2018-7166)
* deps:
* Upgrade to OpenSSL 1.1.0i, fixing:
- Client DoS due to large DH parameter (CVE-2018-0732)
- ECDSA key extraction via local side-channel (CVE not assigned)
* Upgrade V8 from 6.7 to 6.8 (Michaël Zasso) #21079
- Memory reduction and performance improvements, details at:
https://v8project.blogspot.com/2018/06/v8-release-68.html
* http: `http.get()` and `http.request()` (and `https` variants) can now accept
three arguments to allow for a `URL` _and_ an `options` object
(Sam Ruby) #21616
* Added new collaborators
* Sam Ruby (https://github.com/rubys)
* George Adams (https://github.com/gdams)
| Back | FazBrowse Home | New Git URL |
fixes #20795
Checklist