Long URL for Websocket gets cut off

Is there a limit to FString as a URL? I’m trying to open this websocket connection to my AWS endpoint and I wanna send a JWT as URL parameter, but I can see that it gets cut off at roughly 400 characters.

const FString ServerURL = TEXT("wss://ws.endpoint.com/?Auth=JWT_1000_characters....");
const FString ServerProtocol = TEXT("wss");
TMap<FString, FString> Headers;
Headers.Add(TEXT("Upgrade"), TEXT("websocket"));
Headers.Add(TEXT("Connection"), TEXT("upgrade"));
TSharedPtr<IWebSocket> Socket = FWebSocketsModule::Get().CreateWebSocket(ServerURL, ServerProtocol, Headers);

I know that the string gets cut off, because I can see the token in my endpoint log but most of it is missing.
I know for a fact that this length is not a problem because I can use the same one in a browser via javascript and with a CLI tool like wscat and it works just fine.
Putting the token inside a header is an option (I didnt test yet) but it would require a rework on the target and other applications using the same target, so I would prefer not doing that.

1 Like

the one who wrote that s** used char UrlPath[300];
https://github.com/EpicGames/UnrealEngine/commit/ea1c279f766a901fa7e5b7a03ec4558c12d4fa63#diff-933db92d3d268d511481359250fd6636d389c27ba8409838ef963ee4700395e1