Skip to content

HTTP 400 error code for HTTP proxy workaround with LDClientConfigBuilder_ServiceEndpoints_RelayProxyBaseURL #459

@TouHouPolice

Description

@TouHouPolice

Is this a support request?
Yes

Describe the bug
I'm trying to use LDClientConfigBuilder_ServiceEndpoints_RelayProxyBaseURL walk-around mentioned in #394 to set HTTP proxy.
To reproduce

const std::string kSelectedProxy = "http://xx.xx.xx.xxx:443";

LDClientConfigBuilder builder = LDClientConfigBuilder_New(SDKKey);

std::cout<<"Using Proxy: "<<kSelectedProxy<<std::endl;
LDClientConfigBuilder_ServiceEndpoints_RelayProxyBaseURL(builder, kSelectedProxy.c_str());
......
std::cout<<"Starting client..."<<std::endl;
if (LDClientSDK_Start(client, kMaxWait, &initialized_successfully))
......

Expected behavior
SDK connects to LD endpoints through proxy.

Logs
Logs in streaming mode:

Using Proxy: http://xx.xx.xx.xxx:443
Starting client...
[LaunchDarkly] sse-client: backing off in (1) seconds due to HTTP status 400 (Bad Request)
[LaunchDarkly] sse-client: backing off in (3) seconds due to HTTP status 400 (Bad Request)
[LaunchDarkly] sse-client: backing off in (5) seconds due to HTTP status 400 (Bad Request)
Connection Timeout.

Logs in polling mode:

Using Proxy: http://xx.xx.xx.xxx:443
Starting client...
Connection Timeout.

SDK version
3.5.0

Language version, developer tools
C++17

OS/platform
Apple M3 Pro, 14.3

Additional context
The proxy servers are working without issue for other testings. I've also verified them using curl -x http://my-proxy:port https://www.google.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: sdk/clientIssues affecting the C++ Client SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions