aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAdrian Villin <avillin@cisco.com>2024-08-19 14:41:35 +0200
committerAdrian Villin <avillin@cisco.com>2024-08-19 14:47:25 +0200
commit3601b322a010b0c0a83aeec912b224ec97b9c898 (patch)
tree89371cba3e2775f3092ba8a65dd4ad0eb8ad93f7 /extras
parent5546755d1a76be9bb3b6a98fb8280f8e9a17ffd1 (diff)
http: make Media Types RFC9110 compliant
- https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type https://www.iana.org/assignments/media-types/media-types.xhtml Type: improvement Change-Id: I2624dc39a985ff3999aed6e1c833220b7049828d Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/hs-test/http_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 1f3a5f35b74..5b2b65f4eb2 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -201,7 +201,7 @@ func HttpClientTest(s *NoTopoSuite) {
s.LogHttpReq(true),
ghttp.VerifyRequest("GET", "/test"),
ghttp.VerifyHeader(http.Header{"User-Agent": []string{"http_cli_client"}}),
- ghttp.VerifyHeader(http.Header{"Accept": []string{"text / html"}}),
+ ghttp.VerifyHeader(http.Header{"Accept": []string{"text/html"}}),
ghttp.RespondWith(http.StatusOK, "<html><body><p>Hello</p></body></html>"),
))
server.Start()
@@ -249,7 +249,7 @@ func HttpClientPostFormTest(s *NoTopoSuite) {
ghttp.CombineHandlers(
s.LogHttpReq(true),
ghttp.VerifyRequest("POST", "/test"),
- ghttp.VerifyContentType("application / x-www-form-urlencoded"),
+ ghttp.VerifyContentType("application/x-www-form-urlencoded"),
ghttp.VerifyBody([]byte(body)),
ghttp.RespondWith(http.StatusOK, nil),
))
@@ -280,7 +280,7 @@ func httpClientPostFile(s *NoTopoSuite, usePtr bool, fileSize int) {
s.LogHttpReq(false),
ghttp.VerifyRequest("POST", "/test"),
ghttp.VerifyHeader(http.Header{"Content-Length": []string{strconv.Itoa(fileSize)}}),
- ghttp.VerifyContentType("application / octet - stream"),
+ ghttp.VerifyContentType("application/octet-stream"),
ghttp.RespondWith(http.StatusOK, nil),
))
server.Start()
@@ -1014,7 +1014,7 @@ func HttpHeadersTest(s *NoTopoSuite) {
"GET /show/version HTTP/1.1\r\nHost:"+serverAddress+":80\r\nUser-Agent:test\r\nAccept:text/xml\r\nAccept:\ttext/plain\t \r\nAccept:text/html\r\n\r\n")
s.AssertNil(err, fmt.Sprint(err))
s.AssertContains(resp, "HTTP/1.1 200 OK")
- s.AssertContains(resp, "Content-Type: text / plain")
+ s.AssertContains(resp, "Content-Type: text/plain")
s.AssertNotContains(resp, "<html>", "html content received instead of plain text")
}