Bug in URL encoding

A general discussion forum.
Posts: 5
Joined: 29 Jul 2010, 15:24

Bug in URL encoding

Postby vitaliy » 23 Aug 2010, 14:58

Hi All,

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

      std::string name;
      URI::encode(it->first, "=&+;", name);
      std::string value;
      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.


Posts: 1268
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Bug in URL encoding

Postby guenter » 23 Aug 2010, 17:20

Thanks. Fixed in the next release (see https://sourceforge.net/tracker/index.p ... tid=725709)

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests