Skip to content

Commit

Permalink
Added hex streams for an HTTP1 response
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jpcofr committed Oct 15, 2023
1 parent 82f41a9 commit 2f7dcb1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Tests/Packet++Test/PacketExamples/HTTP1_chunk_1.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
020000004500008300004000400600007f0000017f0000011f90d629082609dd952ce8fe801818e9fe7700000101080aad87e6f5b3a7bb94485454502f312e3120323030204f4b0d0a436f6e74656e742d547970653a206170706c69636174696f6e2f6a736f6e0d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a
1 change: 1 addition & 0 deletions Tests/Packet++Test/PacketExamples/HTTP1_chunk_2.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
020000004500006a00004000400600007f0000017f0000011f90d62908260a2c952ce8fe801818e9fe5e00000101080aad87e6f5b3a7bb9433300d0a7b226e616d65223a20225261796d6f6e6420537072696e676572222c2022616765223a2033302c20226d6172726965640d0a
1 change: 1 addition & 0 deletions Tests/Packet++Test/PacketExamples/HTTP1_chunk_3.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
02000000450000ac00004000400600007f0000017f0000011f90d62908260a62952ce8fe801918e9fea000000101080aad87e6f5b3a7bb9433300d0a223a20747275652c20226368696c6472656e223a205b7b226e616d65223a20224a616e6520537072696e676572222c200d0a33300d0a22616765223a2031307d2c207b226e616d65223a2022506574657220537072696e676572222c2022616765223a20387d0d0a320d0a5d7d0d0a300d0a0d0a
6 changes: 3 additions & 3 deletions Tests/Packet++Test/Tests/HttpTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2f7dcb1

Please sign in to comment.