From: Rob V. <rv...@do...> - 2013-07-29 16:59:43
|
Comments inline: On 7/28/13 7:32 PM, "Tomasz Pluskiewicz" <tom...@gm...> wrote: >Hi Rob > >I've noticed a problem with a portable library test on TeamCity: >http://ci.dotnetrdf.org/viewLog.html?buildId=432&tab=buildResultsDiv&build >TypeId=bt2#testNameId1576347966166389640 > >I've been trying to crack this and for that I am refactoring this code >so that there are some actual assertions and I've noticed some >discrepancies between VDS.RDF.HttpUtility and System.Web.HttpUtility >UrlEncode method: > >1. The portable code encodes the hyphen sign, which System class leaves >intact >2. The portable code encodes spaces as %20 and System class encodes >spaces as + >3. The portable code leaves % intact and System class encodes % and %20 >Are these differences by design? Hyphen sign should probably be left alone, may be an error in the range of characters considered safe. While since that code was touched, 2 is better behavior because space as + is not strictly speaking a valid URL encoding and is more an archaic behavior or old browser and servers, %20 for spaces should be the norm. As for 3 that is trickier, URL encoding and decoding is very error prone if done multiple times. I thing my implementation left already percent encoded terms encoded (or at least if they looked like already encoded things) whereas the System implementation just re-encodes things if run multiple times. Rob > >Regards, >Tom > >-------------------------------------------------------------------------- >---- >See everything from the browser to the database with AppDynamics >Get end-to-end visibility with application monitoring from AppDynamics >Isolate bottlenecks and diagnose root cause in seconds. >Start your free trial of AppDynamics Pro today! >http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktr >k >_______________________________________________ >dotNetRDF-bugs mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-bugs |