MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getHttpBody

Method getHttpBody

src/main/java/core/packetproxy/http/Http.java:567–580  ·  view source on GitHub ↗
(byte[] input_data)

Source from the content-addressed store, hash-verified

565 }
566
567 private static byte[] getHttpBody(byte[] input_data) throws Exception {
568 byte[][] search_words = {new String("\r\n\r\n").getBytes(), new String("\n\n").getBytes(),
569 new String("\r\r").getBytes()};
570 for (byte[] search_word : search_words) {
571
572 int idx;
573 if ((idx = Utils.indexOf(input_data, 0, input_data.length, search_word)) < 0) {
574
575 continue;
576 }
577 return ArrayUtils.subarray(input_data, idx + search_word.length, input_data.length);
578 }
579 return new byte[]{};
580 }
581
582 private static byte[] zstd_decompress(byte[] input_data) throws Exception {
583 ByteArrayInputStream in = new ByteArrayInputStream(input_data);

Callers 1

HttpMethod · 0.95

Calls 2

indexOfMethod · 0.95
getBytesMethod · 0.65

Tested by

no test coverage detected