Skip to content

Commit

Permalink
fix: Add missing lock
Browse files Browse the repository at this point in the history
  • Loading branch information
michaljurecko committed Sep 27, 2024
1 parent 7f76d80 commit 4b4fb5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/pkg/service/stream/mapping/recordctx/fasthttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func (c *fastHTTPContext) BodyBytes() ([]byte, error) {
}

func (c *fastHTTPContext) BodyLength() int {
c.lock.Lock()
defer c.lock.Unlock()
return len(c.req.Request.Body())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func testCases(t *testing.T, ts *testState) []TestCase {
// "statusCode": 413,
// "error": "stream.in.bodyTooLarge",
// "message": "Request body size is over the maximum \"8000B\"."
//}`,
// }`,
// },
{
Name: "stream input - POST - disable sink",
Expand Down

0 comments on commit 4b4fb5a

Please sign in to comment.