Fix thread safety issue in chunked http transfers.
* The use of a static variable for storing the chunk size made it shared between all instances of BUrlProtoclHttp. * Inline the function at the single place where it is used, and allocate the variable on the stack instead. The whole receiving loop should be split into chunked and non-chunked variants to improve code readability.
This commit is contained in:
@@ -54,9 +54,6 @@ private:
|
||||
void _ParseStatus();
|
||||
void _ParseHeaders();
|
||||
|
||||
void _CopyChunkInBuffer(char** buffer,
|
||||
ssize_t* bytesReceived);
|
||||
|
||||
void _AddOutputBufferLine(const char* line);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user