HPCC-10301 Read enough data for mime header process when uploading files

When uploading files, a data buffer is used to process the file data
(1k) block by block. After one file is read, a part of file data for the
next file is left inside the data buffer. If the data does not contain
all of the mime headers for the file, the file data cannot be treated
properly. This fix checks the data size in the data buffer. If the
data buffer has less than 512 bytes, then I append the next 1K block
to the data buffer before processing.

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
Merge pull request #5111 from wangkx/h10301

HPCC-10301 Read enough data for mime header process when uploading files

Reviewed-By: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>