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

toml,xml: Fail fast on invalid content #594

Merged
merged 1 commit into from
Feb 22, 2023
Merged

toml,xml: Fail fast on invalid content #594

merged 1 commit into from
Feb 22, 2023

Conversation

wader
Copy link
Owner

@wader wader commented Feb 22, 2023

encoding/xml and github.com/BurntSushi/toml both reads a lot before detecting that it can't decode. Now we instead read one UTF-8 and make sure it's valid xml or toml

Should speed up probing

Relatd to #586 bigzero-zip.zip

encoding/xml and github.com/BurntSushi/toml both reads a lot before detecting
that it can't decode. Now we instead read one UTF-8 and make sure it's valid
xml or toml.

Should speed up probing

Related to #586 bigzero-zip.zip
@wader wader mentioned this pull request Feb 22, 2023
@wader wader merged commit 9f7d50b into master Feb 22, 2023
@wader wader deleted the xml-toml-fail-fast branch February 22, 2023 15:33
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.

None yet

1 participant