Skip to content

Commit

Permalink
Merge pull request #10 from kubescape/quotes
Browse files Browse the repository at this point in the history
unquote headers flag if needed
  • Loading branch information
matthyx authored Apr 4, 2024
2 parents b5d692f + 63121be commit a6de4ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/url"
"os"
"slices"
"strconv"
"strings"

"github.com/armosec/utils-go/httputils"
Expand Down Expand Up @@ -38,6 +39,11 @@ func (f *FlagParser) parser() {
flag.StringVar(&f.pathToOutput, "path-output", "", "path to output file")

flag.Parse()

// unquote headers
if unquote, err := strconv.Unquote(f.headers); err == nil {
f.headers = unquote
}
}

func (f *FlagParser) validate() error {
Expand Down

0 comments on commit a6de4ec

Please sign in to comment.