Skip to content

Conversation

karfas
Copy link
Contributor

@karfas karfas commented Nov 27, 2021

On the ESP32, socket.getaddrinfo() might return SOCK_DGRAM instead of SOCK_STREAM.
As a HTTP request is always a TCP stream, we don't need to rely on the values returned by getaddrinfo.

On the ESP32, socket.getaddrinfo() might return SOCK_DGRAM instead of SOCK_STREAM.
As a HTTP request is always a TCP stream, we don't need to rely on the values returned by getaddrinfo.
@karfas karfas changed the title ESP32: Workaround for faulty getaddrinfo() with ".local" adresses. python-ecosys/urequests: Workaround for faulty getaddrinfo() with ".local" adresses on ESP32. Nov 27, 2021
@andrewleech
Copy link
Contributor

This looks like a worthwhile safe change. While normally I'd avoid workarounds in a library for a port-specific issue, as you say a HTTP request should always be set up with SOCK_STREAM so this change makes sense to me.

@andrewleech andrewleech mentioned this pull request Jun 20, 2022
@andrewleech
Copy link
Contributor

Merged in a725c42 as part of #500.
@karfas I updated the commit message to match the style of the project but maintained you as the author. Thanks for the change!

@andrewleech andrewleech closed this Jul 3, 2022
@karfas karfas deleted the karfas-patch-1 branch July 4, 2022 14:03
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