Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(http-log): support charset in content-type header #10533

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

tysoekong
Copy link
Contributor

@tysoekong tysoekong commented Mar 21, 2023

Summary

Checklist

Full changelog

  • adds application/json; charset=utf-8 option for the Content-Type header in the http-log plugin, for log collectors that require that character set declaration.

Issue reference

Reported in FTI 4931.

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2023

CLA assistant check
All committers have signed the CLA.

@tysoekong
Copy link
Contributor Author

Integration tests are failing at PDK stage:

spec/02-integration/07-sdk/05-pdk_spec.lua:54: Expected strings to match.
Passed in:
(string) '{"headers":{"connection":"keep-alive","host":"127.0.0.1:15555","user-agent":"lua-resty-http/0.17.0-beta.1 (Lua) ngx_lua/10021","x-real-ip":"127.0.0.1","x-forwarded-for":"127.0.0.1","x-forwarded-host":"test.com","x-forwarded-port":"9000","x-forwarded-path":"/request","x-forwarded-proto":"http"},"uri_args":{},"vars":{"request_time":"0.000","host":"127.0.0.1","request":"GET /request HTTP/1.1","server_protocol":"HTTP/1.1","realip_remote_addr":"127.0.0.1","remote_addr":"127.0.0.1","ssl_server_name":"no SNI","request_method":"GET","hostname":"fv-az267-679","realip_remote_port":"51262","remote_port":"","uri":"/request","is_args":"","request_uri":"/request","binary_remote_addr":"\u007f\u0000\u0000\u0001","scheme":"http","https":"","request_length":"289","server_name":"mock_upstream","server_port":"15555","server_addr":"127.0.0.1"},"post_data":{"params":null,"text":"","kind":"unknown"},"url":"http://127.0.0.1:15555/request"}'
Expected:
(string) '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$'

I do not think that I have broken this, it is a missing string substitution or something...?

@bungle
Copy link
Member

bungle commented Mar 22, 2023

Integration tests are failing at PDK stage:

I do not think that I have broken this, it is a missing string substitution or something...?

Yes, this is seen in other prs too.

@bungle bungle merged commit 99eff6d into Kong:master Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants