Skip to content

Commit ef397c3

Browse files
authored
Fix concurrency crash (#91)
1 parent 5ace3e8 commit ef397c3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

emulator/src/client/restful.go

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ func POST(service, endpoint string, port int, payload string, headers http.Heade
5050

5151
request, _ := http.NewRequest(http.MethodPost, url, bytes.NewReader(postData))
5252

53-
// Override the content type
54-
headers.Set("Content-Type", "application/json")
5553
// Forward any other headers set by the user
5654
for key, values := range headers {
5755
for _, value := range values {

emulator/src/stressors/forward.go

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ func ExtractHeaders(request any) http.Header {
4747
}
4848
}
4949

50+
// Override the content type
51+
forwardHeaders.Set("Content-Type", "application/json")
52+
5053
return forwardHeaders
5154
}
5255

0 commit comments

Comments
 (0)