Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADBDEV-2976: Handle multi_perform curl errors immediately (#24)
The internal buffer will be filled during the first pxfprotocol_import call. If there is chunk corruption, we fail here without trying to interpret the received message during check_response. But if a corrupted chunk is read during the next filling of the buffer, this chunk will be written in the internal buffer. Then if trailer CRLF sequence is not faced, CHUNKE_BAD_CHUNK (with code 3) will be returned and connection must be interrupted as far as application isn't able to find next chunk start position. But current PXF implementation doesn't check error buffer in case of internal buffer isn't empty (we've already placed corrupted chunk here) and tries to interpret it with gpdbwritableformatter_import. If we are lucky and memory corruption isn't happened, we receive error during next buffer filling. To solve this problem, we should check multi_perform result, similar to curl_easy_perform libcurl function.
- Loading branch information