Juce URL without scheme not returning expected values


#1

Hi,

I’ve just noticed that there’s an unexpected behavior with the URL class which does not match the documentation, which causes that for the following input:

127.0.0.1:80

Juce will return the following values for these methods:

getPort() -> 0 (expected 80)
getScheme() -> “127.0.0.1” (expected: “”)

All seems to work fine when a scheme is provided, however in both cases isWellFormed() returns true.

Best,


#2

Could anyone let me know if this is a bug or is it the expected behavior?


#3

This should be fixed on the latest develop branch.


#4

Thank you Fabian,

Do you expect to make a release anytime soon including this change?


#5

You can already use it on the develop branch or simply cherry-pick the commit yourself. Every now and then - when we deem JUCE to be stable enough - we will fast-forward master to match the develop branch.