From: Rob V. <rv...@do...> - 2013-08-05 22:22:52
|
Just to close the loop on this we should be leaving hyphen alone >From RFC 3986 Section 2.1 - http://tools.ietf.org/html/rfc3986#section-2.3 For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. I'll check the implementation and make sure all those characters are marked as safe by our implementations Rob On 7/30/13 11:42 AM, "Tomasz Pluskiewicz" <tom...@gm...> wrote: >Okay, we're all set then :) > >On Mon, Jul 29, 2013 at 10:48 PM, Rob Vesse <rv...@do...> wrote: >> While being standards compliant is nicest being compatible with System >>is >> the goal of the code. >> >> However for the + vs %20 I would always choose to use %20 even if it >> differs from the System behavior, as well as better standards compliance >> there is also the issue that Uri.UnescapeDataString() doesn't decode + >>to >> %20 which tends to break stuff. >> >> Rob >> >> On 7/29/13 12:05 PM, "Tomasz Pluskiewicz" <tom...@gm...> >> wrote: >> >>>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&b >>>>>ui >>>>>ld >>>>>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.c >>>>>lk >>>>>tr >>>>>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.cl >>>>kt >>>>rk >>>> _______________________________________________ >>>> dotNetRDF-develop mailing list >>>> dot...@li... >>>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop >>> >>>------------------------------------------------------------------------ >>>-- >>>---- >>>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.clk >>>tr >>>k >>>_______________________________________________ >>>dotNetRDF-develop mailing list >>>dot...@li... >>>https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop >> >> >> >> >> >> >>------------------------------------------------------------------------- >>----- >> 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.clkt >>rk >> _______________________________________________ >> dotNetRDF-develop mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop > >-------------------------------------------------------------------------- >---- >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.clktr >k >_______________________________________________ >dotNetRDF-develop mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop |