Uh oh!
There was an error while loading. Please reload this page.
http2: request.socket|connection - #130
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sebdeckers
commented
May 17, 2017
@mcollina Do you mean just replicate that logic in our test, or to actually pull in the |
mcollina
commented
May 17, 2017
We need a line that just does this: https://github.com/pillarjs/cookies/blob/master/index.js#L87 |
sebdeckers
commented
May 17, 2017
Okay, I'm just doing a look around for other examples. finalhandler (NPM: 14M/mo)
express (NPM: ∞/mo)
|
mcollina
commented
May 17, 2017
https://github.com/pillarjs/finalhandler/blob/master/index.js#L127-L132 cannot be supported as HTTP1 specific. In that specific case for HTTP1, we would have to destroy the stream, not the connection.
|
sebdeckers
commented
May 17, 2017
hapi// Setup timeoutif(this.raw.req.socket&&this.route.settings.timeout.socket!==undefined){this.raw.req.socket.setTimeout(this.route.settings.timeout.socket||0);// Value can be false or positive}https://github.com/hapijs/hapi/blob/master/lib/request.js#L344-L350 |
mcollina
commented
May 17, 2017
I'm convinced. We need this :). In the test, can you check that whatever |
sebdeckers
commented
May 17, 2017
Added a simple Should I add a test case for HTTPS too? There's not really a difference in core/compat (both are just |
mcollina
commented
May 17, 2017
that's fine as it is |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jasnell
commented
May 17, 2017
Regarding the hapi setTimeout example... I'm curious why it is necessary actually. In the http/2 case, the |
dd06fb5 to
9f3e375Comparesebdeckers
commented
May 17, 2017
@jasnell I suspect it stems from wanting to set different timeouts for specific Hapi routes. See: hapijs/hapi#2195 It would only be possible to apply the timeout once the request has been parsed, not at the initial socket connection listener. Just a guess. |
jasnell
commented
May 17, 2017
Yeah, I get that, but given the multiplexing model, and the fact that individual |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Support the socket/connection getter like require('http') does.
PR-URL: #130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>mcollina
commented
May 18, 2017
Landed as 3904d7c |
Support the socket/connection getter like require('http') does.
PR-URL: #130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>Support the socket/connection getter like require('http') does.
PR-URL: #130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>Support the socket/connection getter like require('http') does.
PR-URL: nodejs#130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>Support the socket/connection getter like require('http') does.
PR-URL: nodejs#130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>Support the socket/connection getter like require('http') does.
PR-URL: nodejs#130
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
As discussed in: #125 (comment)
Adds
request.socketandrequest.connectionfor compatibility with documented HTTP APIs:Use case: I found that popular packages like cookies (NPM: >500k/mo) make use of this to detect the TLS context.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
http2