In my project, I develops RESTful Web Services to act as interfaces for each of my data sources application in my data integration project. To make it flexible enough to handle uncertain requirement. I decided to allow web service GET method to accept data query string (actually JPA Query Language). After testing I found that it return wrong result when where condition got percent symbol(%) in it.
http://data.xxx.net/myresource?criteria= Resource1.x like '%2%'
After look at it for a while .. I found that in RFC 1738: Uniform Resource Locators (URL) specification when we pass url percent symbol is reserved symbol use in order to send special character then .. to be able to pass percent symbol correctly viw GET method. I need to follow URL Spec. by using %25 instead of percent symbol(%) then the correct GET url should be like this
http://data.xxx.net/myresource?criteria= Resource1.x like '%252%25'
Now it works…
I think this should be one point of concern for other special character also when manually create url in GET method.