http: ClientRequest.abort is destroy#28683
Conversation
7962df1 to
cdd194e
Compare
673aa19 to
6bd3be5
Compare
a450164 to
54c460a
Compare
9f97795 to
d0101f8
Compare
|
There is more work to be done (e.g. the TODO in this PR) in terms of making ClientRequest and OutgoingMessage more stream like. But I suggest that be done in future PR's. |
d0101f8 to
ab00509
Compare
|
Fixed failing test |
|
ping @benjamingr |
9f8fb09 to
3bbfbde
Compare
c9baec5 to
3211fe8
Compare
3211fe8 to
6f95d70
Compare
|
@Trott: This is no longer blocked |
|
@Trott: this looks ready |
|
@lpinca you good with this? |
|
I think this requires a CITGM run. The breaking changes are big enough. |
lol, what? :D |
|
Rubber Stamp LGTM :) |
|
@Trott CITGM please |
| Type: Documentation-only | ||
|
|
||
| [`ClientRequest.destroy()`][] should be the same as | ||
| [`ClientRequest.abort()`][]. Make ClientRequest more streamlike by deprecating |
There was a problem hiding this comment.
Optional suggestion:
| [`ClientRequest.abort()`][]. Make ClientRequest more streamlike by deprecating | |
| [`ClientRequest.abort()`][]. Make ClientRequest more stream-like by deprecating |
|
CITGM looks good but this does need a rebase. |
|
I think #29192 is a much more elegant solution, although a bit more risky... |
|
Closing in favor of #29192 which should not be as controversial. Will open a new PR if required once there is consensus. |
ClientRequest.destroy()should be the same asabort(). MakeClientRequestmore streamlike by deprecatingabort().If request has completed it cannot be aborted.
This also allows us to replace a lot of edge case code (e.g.
isRequest) that has to callabortforClientRequestwhile everything else is justdestroy.Calling
destroypreviously instead ofabortmight have some weird behaviour sinceabortseems to take a lot more stuff into account e.g.req.agent.Refs: #28686
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesNOTE TO SELF: look into the callback