File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
dotnet/src/dotnetframework/GxClasses/Domain Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ internal byte[] ReceiveData
134134 {
135135 get
136136 {
137+ if ( _chunkedResponse && _receiveData == null && _receiveStream != null )
138+ {
139+ using ( MemoryStream memstream = new MemoryStream ( ) )
140+ {
141+ _receiveStream . BaseStream . CopyTo ( memstream ) ;
142+ _receiveData = memstream . ToArray ( ) ;
143+ }
144+ }
137145 return _receiveData ;
138146 }
139147 }
@@ -739,6 +747,7 @@ void ReadReponseContent(HttpResponseMessage response)
739747 _encoding = Encoding . UTF8 ;
740748
741749 _receiveStream = new StreamReader ( stream , _encoding ) ;
750+ _receiveData = null ;
742751 }
743752 else
744753 {
@@ -1520,6 +1529,7 @@ protected virtual void Dispose(bool disposing)
15201529 {
15211530 _receiveData = null ;
15221531 _sendStream ? . Dispose ( ) ;
1532+ _receiveStream ? . Dispose ( ) ;
15231533 }
15241534 disposedValue = true ;
15251535 }
You can’t perform that action at this time.
0 commit comments