From a55a2ff730b07f27ce69efde80da62edde674679 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 23 Dec 2022 14:04:22 +0800 Subject: [PATCH] fix: ensure HTTP request method in uppper case --- hrp/runner.go | 2 +- hrp/step_request.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hrp/runner.go b/hrp/runner.go index aa4665ea..9783b1ae 100644 --- a/hrp/runner.go +++ b/hrp/runner.go @@ -559,7 +559,7 @@ func (r *SessionRunner) Start(givenVars map[string]interface{}) error { // check if failfast if r.caseRunner.hrpRunner.failfast { - return errors.Wrap(err, "abort running due to failfast setting") + return errors.New("abort running due to failfast setting") } } diff --git a/hrp/step_request.go b/hrp/step_request.go index d56536bd..12a8ffbb 100644 --- a/hrp/step_request.go +++ b/hrp/step_request.go @@ -317,7 +317,7 @@ func runStepRequest(r *SessionRunner, step *TStep) (stepResult *StepResult, err config := r.caseRunner.parsedConfig rb := newRequestBuilder(parser, config, step.Request) - rb.req.Method = string(step.Request.Method) + rb.req.Method = strings.ToUpper(string(step.Request.Method)) err = rb.prepareUrlParams(stepVariables) if err != nil {