URL readStream functions broken between 4.2 and 4.3

It looks like the change to the Network module this past November might have done something funky on Linux, I updated to 4.3.1 recently, and previously-working code started failing.

I’ve been running a local Virtual Machine running a Flask server that implements a simple API. Since it’s local my URLs have looked like http://localhost:9090/<rest of API call> and the last version of JUCE I was on (4.2.4) handled everything. After updating, every request to the localhost times out.

What sticks out to me is the response codes from the server: the call is made, and the server responds, but all of this happens after the timeout length. If I set a breakpoint immediately after the URL::readEntireTextStream() call, the program operates, waits for the entire timeout length during that call, after which the breakpoint (with the returned empty string) and 200 response from the server occur as near as makes no difference to simultaneously.

I have not taken the time right now to dig deeply, I was trying to fix an unrelated bug so I rolled back to unblock myself, but I will revisit this when the bug I authored does not consume my attention.

Just to be sure I’m looking at the right bug: this bug occurs when you do not use curl (i.e. JUCE_USE_CURL is set to default or disabled in the Projucer - see screenshot below). I can reproduce this bug when curl is disabled.

In any case, for anything more complex you really want to be enabling curl support on linux. Without it, URL support is extremely limited (for example, it does not support https).

You are right, indeed, JUCE_USE_CURL is disabled my AppHeader, will try it with curl enabled tomorrow.

Enabling curl remedies the bug, thank you very much for the workaround.