Feat: Improve HTTP Headers serializer json log #172 (#173)

* Changed Event struct, field headers from string to map[string][]string

* Add integration test for http Headers
This commit is contained in:
Mario Candela
2025-03-01 12:31:34 +01:00
committed by GitHub
parent f658a26b32
commit 1f59685530
3 changed files with 5 additions and 14 deletions

View File

@ -67,8 +67,11 @@ func (suite *IntegrationTestSuite) TestInvokeHTTPHoneypot() {
response, err := resty.New().R().
Get(suite.httpHoneypotHost + "/index.php")
response.Header().Del("Date")
suite.Require().NoError(err)
suite.Equal(http.StatusOK, response.StatusCode())
suite.Equal(http.Header{"Content-Length": []string{"15"}, "Content-Type": []string{"text/html"}, "Server": []string{"Apache/2.4.53 (Debian)"}, "X-Powered-By": []string{"PHP/7.4.29"}}, response.Header())
suite.Equal("mocked response", string(response.Body()))
response, err = resty.New().R().