Skip to content

fix parsing error on lines like b'X-Geo-Block-List:' as received by github #17

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

Merged
merged 1 commit into from
Jan 25, 2020

Conversation

ladyada
Copy link
Member

@ladyada ladyada commented Jan 25, 2020

We now pre-fill the contents to an empty string

@ladyada ladyada requested a review from a team January 25, 2020 20:54
Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should work as before when the input contains ": " but correctly handle the case where split returns just 1 item instead of 2. Slightly confused as to why b'X-Geo-Block-List:' would trigger this condition, but I figured it out: the split includes the colon and the space, but the space isn't present in the (empty) X-Geo-Block-List.

@jepler jepler merged commit 9d75832 into adafruit:master Jan 25, 2020
@ladyada
Copy link
Member Author

ladyada commented Jan 25, 2020

yeah there's nothing after, and so split() gives an array of length 1

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 26, 2020
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.

2 participants