Closed Fedorus closed 4 years ago
@Fedorus is it possible for you to construct a minimal repro case?
No response, closing. If there is repro available, we can reopen. FYI @ianhays
I've found a repro case for this issue. Code in .NET Framework: https://dotnetfiddle.net/bdnNCF Code in .NET Core: https://dotnetfiddle.net/K8JH5A The code attached is exactly the same, only the compiler is different.
I
ve tried to port popular library for http requests called xNet and faced interesing issue. Library compiled for standart 2.0 works fine when it
s used in Windows Console project and falls with errow when used in Core Console Project (both test projects in my repo). Problem appiers when you try to download http content coded with gzip. Problem located to this line: https://github.com/Fedorus/xNetStandart/blob/master/~Http/HttpResponse.cs#L1487int bytesRead = stream.Read(buffer, 0, bufferSize);
where int bufferSize = ~65k buffer = new byte[bufferSize] and real stream content is less.On such circumstances code will fail becouse stream will wait for data. I
ve tried fixing it but failed. Looks like there is something deeper but I haven
t located it yet.There is original repo of xNet and my modified version with 2 test projects (windows and core console) origin: https://github.com/X-rus/xNet ported: https://github.com/Fedorus/xNetStandart
Thanks for atention. I hope someone will point me in my mistake or helps solving this issue.