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

Add option to disable cerificate checks for SSL connectiond and to set a #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ventar
Copy link

@Ventar Ventar commented Jul 16, 2019

custom user agent header

Allows to use the libary in test environments without valid cerificates.

@sebastien-savalle
Copy link

Any news on this PR ?

@Links2004
Copy link
Owner

the code change is not compatible with the ESP32 (see travis).
to merge it it needs to be written in a way that it is working on all supported platforms.
(only adding setInsecure for the ESP8266 is a option too)

@Links2004
Copy link
Owner

the setInsecure problem on the ESP8266 will be fixed via #569
if you remove the Insecure part its possible to add the setUserAgent functions

@@ -571,7 +596,12 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
handshake += client->extraHeaders + NEW_LINE;
}

handshake += WEBSOCKETS_STRING("User-Agent: arduino-WebSocket-Client\r\n");
if (client->userAgentHeader.length() > 0) {
handshake += WEBSOCKETS_STRING("User-Agent: ") + client->userAgentHeader;
Copy link
Owner

Choose a reason for hiding this comment

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

missing \r\n ?

handshake += WEBSOCKETS_STRING("User-Agent: ") + client->userAgentHeader + NEW_LINE;

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

3 participants