I just implemented a new callback and all worked as designed on my dev machine. I'm passing one parameter, in this case '06:00'. Below is the callback output, looks normal:
After I moved this appto my server the callback seemed to stop working and this is the output:
The 1st entry looks ok but returns a 302, not 200.
Following 6 entries immediately come from the app and the parameters are munged starting with the ':' also returning a 302.
Thinking it's a parsing issue I base64 encoded the parameter (then decode it to use it).
Now everything works. Don't know if this is related to the other callback issues but maybe it's a clue.
No, it's just a simple one click one call (otherwise it shouldn't have worked on my dev machine). Turns out it only happens in SSL mode and the ajax processing doesn't like the ':' character. Attached is a sample project demonstrating the issue.
>>I believe it will work if you use encodeURIComponent() on your parameters...
Yes, it works as the Base64 encoding (but without the need to decode).
Here's what's happening with SSL on the IW side with a single ':' as an ajax callback parameter: The ':' is removed then the parameter string is inserted back into the parameter string recursively until it breaks a 4K limit. In my case the ajax call repeated 6 times from a single click until the 4k limit is reached. Probably would keep repeating otherwise. Attached is the IW output from a test and you can absolutely see what's happening.
12-06-2019, 11:25 PM (This post was last modified: 12-06-2019, 11:30 PM by Alexandre Machado.)
I tested your application and seems that this problem only occurs in C++ Builder. The exact same code when ported to a Delphi project doesn't behave the same (it works as expected).
We had some weird bugs in the past which were happening in C++ Builder and not in Delphi due to C++Builder compiler bugs... not sure yet. I'm still investigating the issue.