-
Notifications
You must be signed in to change notification settings - Fork 169
feat(websocket): Add websocket HTTP redirect #771
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, but
we have to handle old IDFs, i.e. this component needs to work with tcp_transport
component which doesnt' support redirects.
we usually do it with feature list macros, which are defined depending on IDF versions (you can check mqtt client component for example: https://github.com/espressif/esp-mqtt/blob/master/include/mqtt_supported_features.h)
d98ecab
to
6afad51
Compare
6afad51
to
2613138
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in this PR LGTM!
2613138
to
098f6ba
Compare
098f6ba
to
72fb7bf
Compare
- Handle 301 status (moved permanently) and redirect the connection to the new host.
72fb7bf
to
cd119da
Compare
@@ -598,6 +604,23 @@ static esp_err_t esp_websocket_client_create_transport(esp_websocket_client_hand | |||
return ESP_OK; | |||
} | |||
|
|||
static void esp_websocket_client_prepare_transport(esp_websocket_client_handle_t client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is an internal function there is little reason to test for valid transport as this must be validated on user facing APIs.
The function also only set the port, I don't see the need for it.
The name is also too generic.
In summary I think this function should be removed.
Description