- Notifications
You must be signed in to change notification settings - Fork2.7k
Fix binary files retrieval#1183
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 ourterms of service andprivacy 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 fixes binary file corruption in theget_file_contents
tool by improving content-type detection logic to properly differentiate between text and binary content types.
- Replaced broad application/* prefix matching with specific text content type detection
- Added comprehensive test coverage for PDF binary file handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/github/repositories.go | Updated content-type detection logic to properly identify text vs binary content |
pkg/github/repositories_test.go | Added test case for PDF file retrieval to verify binary content handling |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
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.
lgtm!
dee5927
intomainUh oh!
There was an error while loading.Please reload this page.
This PR fixes binary file corruption in the
get_file_contents
tool by tightening content-type detection logic.Closes:#1168