But seriously, this thread is from 9 years ago! And if you want us to actually help with your problem you'd need to give us more info than just saying that some unknown code of yours doesn't work on some URLs..
Code like in 1st message but createInputStream(false). And this some images load and some not load. I dont have idea why .... Mac OS X 10.11. XCode 7.1 C++14/libc++ . On Windows its ok (Win10 VS2015)
Sorry, but i think i found problem... "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."