We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ext-plugin-post-resp processing content-type have problem
I have seen fixed the issue: apache/apisix#8588 But still have problem
uname -a
1.plugin run in debug mode
2.Changed the original text/html; charset=utf-8 to: text/plain; charset=utf-8 The code doesn't even do any business logic:
type FileRetentionConfig struct { Enable bool `json:"enable"` } type FileRetentionPlugin struct { } func (f FileRetentionPlugin) Name() string { return "file_retention_plugin" } func (f FileRetentionPlugin) ParseConf(in []byte) (conf interface{}, err error) { config := FileRetentionConfig{} err = jsoniter.Unmarshal(in, &config) return config, err } func (f FileRetentionPlugin) RequestFilter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request) { // do nothing } func (f FileRetentionPlugin) ResponseFilter(conf interface{}, w pkgHTTP.Response) { contentType := w.Header().Get("content-type") w.Header().Set("content-type", contentType) log.Infof("contentType:%v", contentType) }
hanged the original text/html; charset=utf-8 to: text/plain; charset=utf-8
do not change content-type or change to the value specified in the code
The text was updated successfully, but these errors were encountered:
lost content-type?
Sorry, something went wrong.
same problem
No branches or pull requests
Issue description
ext-plugin-post-resp processing content-type have problem
I have seen fixed the issue: apache/apisix#8588
But still have problem
Environment
uname -a
): Linux asec 5.15.0-78-generic 85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux(running in docker)
Minimal test code / Steps to reproduce the issue
1.plugin run in debug mode
2.Changed the original text/html; charset=utf-8 to: text/plain; charset=utf-8
The code doesn't even do any business logic:
What's the actual result? (including assertion message & call stack if applicable)
hanged the original text/html; charset=utf-8 to: text/plain; charset=utf-8
What's the expected result?
do not change content-type or change to the value specified in the code
The text was updated successfully, but these errors were encountered: