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

Sanitize file data before parsing with Jackson #1334

Merged
merged 7 commits into from
Feb 10, 2017
Merged

Conversation

jhaber
Copy link
Member

@jhaber jhaber commented Nov 1, 2016

This takes the raw response from Mesos and decodes it with a UTF8 decoder that ignores invalid characters before passing the sanitized data to Jackson for parsing (which should now always succeed). Since these responses can be non-trivial in size I tried to avoid extra allocations as much as possible (the Response class exposes the data as a ByteBuffer which gets converted to a CharBuffer which backs the Reader passed to Jackson).

@tpetr @ssalinas

@ssalinas ssalinas modified the milestone: 0.12.0 Nov 2, 2016
Tom Petr added 2 commits November 21, 2016 09:31
replace instead of ignore so that we can update the offset
@ssalinas ssalinas modified the milestones: 0.13.0, 0.14.0 Dec 8, 2016
@ssalinas ssalinas added the hs_qa label Dec 13, 2016
@tpetr tpetr added the hs_stable label Jan 9, 2017
@ssalinas ssalinas merged commit dc2c4de into master Feb 10, 2017
@ssalinas ssalinas deleted the invalid-utf8 branch February 10, 2017 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants