From 2f7dcb1f2d7d08d1d1181b504dcfd75e6d1a1401 Mon Sep 17 00:00:00 2001 From: Juan Pablo Contreras Franco Date: Sun, 15 Oct 2023 16:21:23 +0200 Subject: [PATCH] Added hex streams for an HTTP1 response The payload is a JSON object. HTTP1_chunk_1 holds the HTTP 200 message. HTTP1_chunk_2 holds the first part of the packet. HTTP1_chunk_3 holds the last part of the packet. --- Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat | 1 + Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat | 1 + Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat | 1 + Tests/Packet++Test/Tests/HttpTests.cpp | 6 +++--- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat index e69de29bb2..0d8de96e59 100644 --- a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat +++ b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat @@ -0,0 +1 @@ +020000004500008300004000400600007f0000017f0000011f90d629082609dd952ce8fe801818e9fe7700000101080aad87e6f5b3a7bb94485454502f312e3120323030204f4b0d0a436f6e74656e742d547970653a206170706c69636174696f6e2f6a736f6e0d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a \ No newline at end of file diff --git a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat index e69de29bb2..e81186e82e 100644 --- a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat +++ b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat @@ -0,0 +1 @@ +020000004500006a00004000400600007f0000017f0000011f90d62908260a2c952ce8fe801818e9fe5e00000101080aad87e6f5b3a7bb9433300d0a7b226e616d65223a20225261796d6f6e6420537072696e676572222c2022616765223a2033302c20226d6172726965640d0a \ No newline at end of file diff --git a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat index e69de29bb2..b508ae2b9f 100644 --- a/Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat +++ b/Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat @@ -0,0 +1 @@ +02000000450000ac00004000400600007f0000017f0000011f90d62908260a62952ce8fe801918e9fea000000101080aad87e6f5b3a7bb9433300d0a223a20747275652c20226368696c6472656e223a205b7b226e616d65223a20224a616e6520537072696e676572222c200d0a33300d0a22616765223a2031307d2c207b226e616d65223a2022506574657220537072696e676572222c2022616765223a20387d0d0a320d0a5d7d0d0a300d0a0d0a \ No newline at end of file diff --git a/Tests/Packet++Test/Tests/HttpTests.cpp b/Tests/Packet++Test/Tests/HttpTests.cpp index f3e71e8b53..e6eb4a5fed 100644 --- a/Tests/Packet++Test/Tests/HttpTests.cpp +++ b/Tests/Packet++Test/Tests/HttpTests.cpp @@ -515,9 +515,9 @@ PTF_TEST_CASE(HttpReassemblyTest) timeval time; gettimeofday(&time, nullptr); - READ_FILE_AND_CREATE_PACKET(1, "PacketExamples/Http1xFrag1.dat"); - READ_FILE_AND_CREATE_PACKET(2, "PacketExamples/Http1xFrag2.dat"); - READ_FILE_AND_CREATE_PACKET(3, "PacketExamples/Http1xFrag3.dat"); + READ_FILE_AND_CREATE_PACKET(1, "PacketExamples/HTTP1_chunk_1.dat"); + READ_FILE_AND_CREATE_PACKET(2, "PacketExamples/HTTP1_chunk_2.dat"); + READ_FILE_AND_CREATE_PACKET(3, "PacketExamples/HTTP1_chunk_3.dat"); pcpp::Packet frag1(&rawPacket1); pcpp::Packet frag2(&rawPacket2);