mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-04 06:00:37 +00:00
26 lines
413 B
C++
26 lines
413 B
C++
#include <cassert>
|
|
#include "../HTTP.h"
|
|
|
|
using namespace i2p::http;
|
|
|
|
int main() {
|
|
const char *buf =
|
|
"4\r\n"
|
|
"HTTP\r\n"
|
|
"A\r\n"
|
|
" response \r\n"
|
|
"E\r\n"
|
|
"with \r\n"
|
|
"chunks.\r\n"
|
|
"0\r\n"
|
|
"\r\n"
|
|
;
|
|
std::stringstream in(buf);
|
|
std::stringstream out;
|
|
|
|
assert(MergeChunkedResponse(in, out) == true);
|
|
assert(out.str() == "HTTP response with \r\nchunks.");
|
|
|
|
return 0;
|
|
}
|