Not sure if you're saying it now was working so not a problem, but if it's still a problem I would suggest grabbing the string you use in the c++ version just before you USE it and just check it over visually for oddities like spaces etc. and stick it back a browser and make sure it's what you thought it was and works. Basically it sounds like it probably should work but might be something silly in formatting that just looks correct on a quick glance.
Also it can simplify things to try HTTP rather than HTTPS initially just to remove the problem of any SSL certificate complaints.
Just noticed you are asking for HTTP 1.0. Could be the problem. I think this is old and might be rejected by some servers. The 404 response is responding with HTTP 1.1 you'll note.
The way the HTTP request is being built is very manual and feels 'hopeful' that the server will like it. Instead I would try to see what an actual browser or tool would send and pretend to be that first with regards to HTTP 1.x spec, user agent etc.