I have little C++ app that communicates with Rails app by sending JSON strings. I had intermittent issues where certain types of input would arrive somewhat mangled to the web app. I've traced it down to URL encoding in HTMLForm::writeUrl. As I see this method fails to encode semicolons properly which eventually breaks URL decoding on the web server side. Per RFC & and ; are valid parameter separators.
Changing HTMLForm::writeURL to encode semicolon fixes the problem.
- Code: Select all
URI::encode(it->first, "=&+;", name);
URI::encode(it->second, "=&+;", value);
I can also hack web app site and remove semicolon from allowed parameter separators but I think this is a bug on Poco side.