comparison Core/ChunkedBuffer.cpp @ 2040:6ea2e264ca50

retrieval of HTTP headers in answers within HttpClient
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 Jun 2016 16:34:30 +0200
parents 5e1ee8f4fc9e
children a3a65de1840f
comparison
equal deleted inserted replaced
2039:e33e0ae51d7b 2040:6ea2e264ca50
49 delete *it; 49 delete *it;
50 } 50 }
51 } 51 }
52 52
53 53
54 void ChunkedBuffer::AddChunk(const char* chunkData, 54 void ChunkedBuffer::AddChunk(const void* chunkData,
55 size_t chunkSize) 55 size_t chunkSize)
56 { 56 {
57 if (chunkSize == 0) 57 if (chunkSize == 0)
58 { 58 {
59 return; 59 return;
60 } 60 }
61 61 else
62 assert(chunkData != NULL); 62 {
63 chunks_.push_back(new std::string(chunkData, chunkSize)); 63 assert(chunkData != NULL);
64 numBytes_ += chunkSize; 64 chunks_.push_back(new std::string(reinterpret_cast<const char*>(chunkData), chunkSize));
65 numBytes_ += chunkSize;
66 }
65 } 67 }
66 68
67 69
68 void ChunkedBuffer::AddChunk(const std::string& chunk) 70 void ChunkedBuffer::AddChunk(const std::string& chunk)
69 { 71 {