fix #1339: omit pseudo header names for HTTP/1, e.g. :authority, :method, :path, :schema

This commit is contained in:
debugtalk
2022-06-17 22:39:19 +08:00
parent 114b94f1d5
commit ce172d42a5
4 changed files with 26 additions and 6 deletions

View File

@@ -13,6 +13,10 @@ teststeps:
foo1: bar1
foo2: bar2
headers:
:authority: postman-echo.com
:method: POST
:path: /get
:schema: https
User-Agent: HttpRunner/3.0
validate:
- eq: ["status_code", 200]

View File

@@ -1,4 +1,4 @@
# NOTE: Generated By HttpRunner v4.1.3
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/hardcode.yml
@@ -18,7 +18,15 @@ class TestCaseHardcode(HttpRunner):
RunRequest("get with params")
.get("/get")
.with_params(**{"foo1": "bar1", "foo2": "bar2"})
.with_headers(**{"User-Agent": "HttpRunner/3.0"})
.with_headers(
**{
":authority": "postman-echo.com",
":method": "POST",
":path": "/get",
":schema": "https",
"User-Agent": "HttpRunner/3.0",
}
)
.validate()
.assert_equal("status_code", 200)
),