-
-
Notifications
You must be signed in to change notification settings - Fork 20
Filter the Accept-Charset header
#792
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a custom Ktor client plugin to remove the Accept-Charset header from outgoing HTTP requests. This addresses compatibility issues with certain servers and aligns with RFC 9110 §12.5.2, which discourages the use of this header.
Changes:
- Added a custom client plugin using Ktor's
createClientPluginAPI that intercepts outgoing requests and removes theAccept-Charsetheader - Added necessary imports for the plugin API (
Send,createClientPlugin,HttpHeaders)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sunkup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Looks really good. One thing only: Right now TestAppHttpClient is in net package, but AppHttpClient is not in a net package. I think we should always put the test file for the corresponding source file in same package structure. So the structure matches.
sunkup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Please merge 👍
Purpose
See #791
Short description
Accept-Charsetheader before sending.Checklist