From: Tomasz P. <tom...@gm...> - 2013-07-29 19:05:49
|
All right. I will fix the hyphen encoding. Regarding spaces and multiple encodings I was just wondering whether the intention was to implement the HttpUtility to be compatible with the System one or more standards compliant. I understand that the latter is intuitively more desirable but it's not so simple. If so I guess it should remain as is but the fact should be clearly documented. Tom On Mon, Jul 29, 2013 at 6:47 PM, Rob Vesse <rv...@do...> wrote: > 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 > > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-develop mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop |