Skip to content

Commit fcadbff

Browse files
committed
update to test changes
1 parent ac7ea91 commit fcadbff

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/aws-cpp-sdk-core/source/http/interceptor/ChunkingInterceptor.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@ class AwsChunkedIOStream : public Aws::IOStream {
2222

2323
protected:
2424
int_type underflow() override {
25-
size_t bytesRead = m_chunkStream.BufferedRead(m_buffer, sizeof(m_buffer));
26-
if (bytesRead == 0) return traits_type::eof();
25+
char buffer[8192];
26+
size_t bytesRead = m_chunkStream.BufferedRead(buffer, sizeof(buffer));
27+
if (bytesRead == 0) {
28+
return traits_type::eof();
29+
}
2730

28-
setg(m_buffer, m_buffer, m_buffer + bytesRead);
31+
// Copy to internal buffer
32+
m_buffer.assign(buffer, buffer + bytesRead);
33+
setg(&m_buffer[0], &m_buffer[0], &m_buffer[0] + bytesRead);
2934
return traits_type::to_int_type(*gptr());
3035
}
3136

3237
private:
3338
Aws::Utils::Stream::AwsChunkedStream<>& m_chunkStream;
34-
char m_buffer[8192];
39+
std::vector<char> m_buffer;
3540
};
3641

3742
Aws::Utils::Stream::AwsChunkedStream<> m_chunkStream;

0 commit comments

Comments
 (0)