diff --git a/baton_test.go b/baton_test.go index 7b2723f..d2deae9 100644 --- a/baton_test.go +++ b/baton_test.go @@ -13,7 +13,7 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - + package main import ( diff --git a/configuration.go b/configuration.go index 5f9e0c1..9976491 100644 --- a/configuration.go +++ b/configuration.go @@ -13,7 +13,7 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - + package main import ( diff --git a/csv_parsing.go b/csv_parsing.go index 9fc3b14..f0d255a 100644 --- a/csv_parsing.go +++ b/csv_parsing.go @@ -13,7 +13,7 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - + package main import ( diff --git a/log_writer.go b/log_writer.go index 6c567bd..2fef451 100644 --- a/log_writer.go +++ b/log_writer.go @@ -13,7 +13,7 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - + package main import "fmt" diff --git a/timed_worker.go b/timed_worker.go index 290a72c..608ccac 100644 --- a/timed_worker.go +++ b/timed_worker.go @@ -13,7 +13,7 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - + package main import ( diff --git a/worker.go b/worker.go index 9da9d82..45a9264 100644 --- a/worker.go +++ b/worker.go @@ -19,6 +19,7 @@ package main import ( "github.com/valyala/fasthttp" "math/rand" + "strings" "time" ) @@ -97,6 +98,10 @@ func buildRequest(requests []preLoadedRequest, totalPremadeRequests int) (*fasth req.Header.SetMethod(currentReq.method) req.SetBodyString(currentReq.body) for i := 0; i < len(currentReq.headers); i++ { + if strings.EqualFold(currentReq.headers[i][0], "Content-type") { + req.Header.SetContentType(currentReq.headers[i][1]) + continue + } req.Header.Add(currentReq.headers[i][0], currentReq.headers[i][1]) } return req, resp