Ed, (FYI, this message is a copy of a message I sent on the Xojo forums.) You and I spoke two years ago about OpenSong via SourceForge Support. I noticed that OpenSong.org is once again defunct, and I wanted to find out if the project itself is being abandoned. I would like to explain my interest … When I first discovered OpenSong, I “fell in love” with it. I even used the OpenSong API to create a fancy-schmancy system that displayed chord sheets on iPads in real-time with the presentation. But the...
As a full-egg-on-face disclosure: the bug ended up being in my REST client process. I urlencoded the set, then passed it back to the client as a URL parameter, then sent it on to OpenSong. When it was passed back to the client, it was (naturally) url decoded again BEFORE being sent to Curl (sigh) Obviously, it needed to be re-urlencoded beforehand ... problem solved. Thanks again!
FYI ... I have confirmed that CURL is decoding the URL spaces before sending. I am now debugging the Curl headers and option to figure out why. MANY THANKS FOR YOUR HELP, and I apologize for not doing due-diligence before contacting you. God bless!
First, THANK YOU for your diligence. I have been using the source from the OpenSong 3.4.8 Beta folder on SourceForge. My REST client is written in PHP and uses Curl ... I will now have to confirm that Curl is not decoding the POST header before sending it along ... I will send an update once I have info. Thanks again!
One other note ... you can see the problem in action by creating two sets: one named "Test" and one named "Test With Spaces". If you use an API call /set/present/Test%20With%20Spaces ... the set"Test" will be presented instead. (If "Test" doesn't exist, you'll receive a 403 error.)
One other note ... you can see the problem in action by creating two sets: one named "Test" and one named "Test With Spaces". If you use an API call /set/present/Test%20With%Spaces ... the set"Test" will be presented instead. (If "Test" doesn't exist, you'll receive a 403 error.)
Yes, I used url encoding, and I even used the "+" symbol as a space. But the spaces are being decoded before they hit the ParseRequest method, and therefore, sets with spaces cause the m_reqURI to only get the URI up to the first space.
API Set Present - Spaces in Set Name Bug - FIX INCLUDED