MCPcopy
hub / github.com/probelabs/goreplay / TEST_setHttpBody

Function TEST_setHttpBody

middleware/middleware.js:726–733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

724}
725
726function TEST_setHttpBody() {
727 const examplePayload = "GET / HTTP/1.1\r\nUser-Agent: Node\r\nContent-Length: 5\r\n\r\nhello";
728 let p = setHttpBody(Buffer.from(examplePayload), Buffer.from("hello, world!"));
729
730 if (p != "GET / HTTP/1.1\r\nUser-Agent: Node\r\nContent-Length: 13\r\n\r\nhello, world!") {
731 fail(`Wrong body: '${p}'`)
732 }
733}
734
735function TEST_httpCookie() {
736 const examplePayload = "GET / HTTP/1.1\r\nCookie: a=b; test=zxc\r\n\r\n";

Callers

nothing calls this directly

Calls 2

setHttpBodyFunction · 0.85
failFunction · 0.85

Tested by

no test coverage detected