Skip to content

Added content-length header check #87

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 2 commits into from
Oct 8, 2020

Conversation

makermelissa
Copy link
Collaborator

Fixes #51.

@makermelissa makermelissa requested a review from a team October 8, 2020 22:07
@makermelissa makermelissa merged commit fb83623 into adafruit:master Oct 8, 2020
@tannewt
Copy link
Member

tannewt commented Oct 9, 2020

What is the core problem? Missing content-length is actually valid. We have an open issues on Requests to support it because Hue lights' API server omits it: adafruit/Adafruit_CircuitPython_Requests#38

@makermelissa
Copy link
Collaborator Author

@tannewt, the problem was that it was blindly trying to read "content-type" and if that was missing it would just completely error out. This just gives it a nicer message, but ideally should be written to deal with the content type missing, which is another issue altogether.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 13, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.5.0 from 3.4.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#88 from makermelissa/http-errors
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#87 from makermelissa/content-headers
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#80 from virgilvox/patch-1
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.

wget Does not check for validity of headers prior to use
3 participants