Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
585 stars 739 forks source link

Does this SDK client support empty proxy username and password? #2559

Closed cabrillosa closed 6 months ago

cabrillosa commented 7 months ago

Hello, I would like to ask if azure-iot-sdk-c can be connected to via a proxy server that does not require a username and password?

====

        proxy_options.host_address  = proxy_options_->host_address;
        proxy_options.port          = proxy_options_->port;
        proxy_options.username      = proxy_options_->username; // <-- This is empty string ""
        proxy_options.password      = proxy_options_->password; // <-- This is empty string ""

        IoTHubDeviceClient_LL_SetOption(device_ll_handle_, OPTION_HTTP_PROXY, &proxy_options);

====

Thank you.

ericwolz commented 7 months ago

Have you tried setting these to NULL? By setting these to a string value, the SDK will transmit these values, even if they are empty strings.

https://github.com/Azure/azure-c-shared-utility/blob/13ea9a78c54ab1e27678b86bc5a7dc52c6933000/adapters/httpapi_curl.c#L964

cabrillosa commented 6 months ago

Thanks @ericwol-msft . Closing this now.