From 0f3dd1b6d6e14aba2cee037beea1e752edddaade Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 18 Feb 2022 19:39:41 +0800 Subject: [PATCH] fix: generate headers.\"Content-Type\" in har2case --- docs/CHANGELOG.md | 1 + internal/har2case/core.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9409946e..f98a1a93 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -3,6 +3,7 @@ ## v0.6.2 (2022-02-18) - fix: omit pseudo header names for HTTP/1, e.g. :authority +- fix: generate `headers.\"Content-Type\"` in har2case ## v0.6.1 (2022-02-17) diff --git a/internal/har2case/core.go b/internal/har2case/core.go index 9683ddb4..e5820883 100644 --- a/internal/har2case/core.go +++ b/internal/har2case/core.go @@ -267,7 +267,7 @@ func (s *tStep) makeValidate(entry *Entry) error { // assert Content-Type if strings.EqualFold(header.Name, "Content-Type") { s.Validators = append(s.Validators, hrp.Validator{ - Check: "headers.Content-Type", + Check: "headers.\"Content-Type\"", Assert: "equals", Expect: header.Value, Message: "assert response header Content-Type",