File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
package sources
2
2
3
3
import (
4
- "io/ioutil "
4
+ "io"
5
5
"log"
6
6
"strconv"
7
7
"strings"
@@ -38,7 +38,7 @@ func newHTTPSource(sourceListManager objectListManager, pipelineFactory sourceHT
38
38
}
39
39
40
40
if numOfFilePerPipeline <= 0 {
41
- return nil , fmt .Errorf ("Invalid operation. The number of files per batch must be greater than zero" )
41
+ return nil , fmt .Errorf ("Invalid operation. The number of files per batch must be greater than zero" )
42
42
}
43
43
44
44
numOfBatches := (len (sourceInfos ) + numOfFilePerPipeline - 1 ) / numOfFilePerPipeline
@@ -205,7 +205,9 @@ func (f *HTTPPipeline) ExecuteReader(partitionsQ chan pipeline.PartsPartition, p
205
205
206
206
return err
207
207
}
208
- p .Data , err = ioutil .ReadAll (res .Body )
208
+ //p.Data, err = ioutil.ReadAll(res.Body)
209
+ _ , err = io .ReadFull (res .Body , p .Data [:p .BytesToRead ])
210
+
209
211
res .Body .Close ()
210
212
if err != nil {
211
213
return err
You can’t perform that action at this time.
0 commit comments