microsoft / typed-rest-client

Node Rest and Http Clients with typings for use with TypeScript
Other
675 stars 118 forks source link

redir hang #19

Closed bryanmacfarlane closed 7 years ago

stephenmichaelf commented 7 years ago

Strange to me that it doesn't hang with 1 request but does on the redirect...

bryanmacfarlane commented 7 years ago

I think I understand it now. Will go over it with you tomorrow

Get Outlook for iOShttps://aka.ms/o0ukef


From: Stephen Franceschelli notifications@github.com Sent: Sunday, November 19, 2017 4:05:09 PM To: Microsoft/typed-rest-client Cc: Bryan MacFarlane; Author Subject: Re: [Microsoft/typed-rest-client] redir hang (#19)

Strange to me that it doesn't hang with 1 request but does on the redirect...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Ftyped-rest-client%2Fpull%2F19%23issuecomment-345549529&data=02%7C01%7Cbryanmac%40microsoft.com%7C668f81ed75704268454908d52f91383d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636467223120054969&sdata=bX6zi8FB6%2FtaEMQCMlnwuPh1DJZrOovUZB6wW%2BJwtKs%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA4IDBSR_19TmgAE9xrW7-NJQJKxfZhbks5s4JgFgaJpZM4QjhVE&data=02%7C01%7Cbryanmac%40microsoft.com%7C668f81ed75704268454908d52f91383d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636467223120054969&sdata=%2BfS8tHd%2FaycMTaLeROCh5jGVXudLp3KpBhnqMg9v2Wk%3D&reserved=0.

stephenmichaelf commented 7 years ago

I think I see what you're saying, we never call ReadBody on the first response message... Sounds good.

bryanmacfarlane commented 7 years ago

Yeah, and we shouldn't. I think we need to readbody on the one we throw away ( you reassign the var ) - or just call destroy but that has the downside of dropping the socket from the server instead of cleanly finishing the request. Note the first call returns the stream so the call calls read body. Of course they don't on the one we throw away on retries

I will confirm when I'm home soon

Get Outlook for iOShttps://aka.ms/o0ukef


From: Stephen Franceschelli notifications@github.com Sent: Sunday, November 19, 2017 6:51:17 PM To: Microsoft/typed-rest-client Cc: Bryan MacFarlane; Author Subject: Re: [Microsoft/typed-rest-client] redir hang (#19)

I think I see what you're saying, we never call ReadBody on the first response... Sounds good.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Ftyped-rest-client%2Fpull%2F19%23issuecomment-345560875&data=02%7C01%7Cbryanmac%40microsoft.com%7C8ec94090b4424ba144a908d52fa86d60%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636467322791837087&sdata=vR5hOAsTGeNfBXKjfE6YMEH9o4suPls2XGS1Hx17FYA%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA4IDIYAYBJmgc9lIYr4CU7cJIkuRBM9ks5s4L70gaJpZM4QjhVE&data=02%7C01%7Cbryanmac%40microsoft.com%7C8ec94090b4424ba144a908d52fa86d60%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636467322791837087&sdata=I3YBI0bKnGLGOtkbyadVi0KA3rhTiXMcZaYzkzu4B8s%3D&reserved=0.

bryanmacfarlane commented 7 years ago

@ericsciple and @stephenmichaelf - updated with a cleaner fix.