comparison OrthancFramework/Sources/HttpServer/MultipartStreamReader.cpp @ 4148:732ad6c618ba

removing ChunkedBuffer::AddChunkDestructive()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Aug 2020 16:56:33 +0200
parents bf7b9edf6b81
children 785a2713323e
comparison
equal deleted inserted replaced
4147:ecc11c232326 4148:732ad6c618ba
124 state_ = State_Content; 124 state_ = State_Content;
125 } 125 }
126 else 126 else
127 { 127 {
128 // We have not seen the end of the unused area yet 128 // We have not seen the end of the unused area yet
129 std::string reminder(current, corpusEnd); 129 buffer_.AddChunk(current, corpusEnd);
130 buffer_.AddChunkDestructive(reminder);
131 return; 130 return;
132 } 131 }
133 } 132 }
134 133
135 for (;;) 134 for (;;)
204 current = headersMatcher_.GetMatchEnd() + contentLength + 2; 203 current = headersMatcher_.GetMatchEnd() + contentLength + 2;
205 } 204 }
206 205
207 if (current != corpusEnd) 206 if (current != corpusEnd)
208 { 207 {
209 std::string reminder(current, corpusEnd); 208 buffer_.AddChunk(current, corpusEnd);
210 buffer_.AddChunkDestructive(reminder);
211 } 209 }
212 } 210 }
213 211
214 212
215 MultipartStreamReader::MultipartStreamReader(const std::string& boundary) : 213 MultipartStreamReader::MultipartStreamReader(const std::string& boundary) :