From: Jeroen H. <vex...@gm...> - 2009-12-14 13:12:52
|
On Mon, Dec 14, 2009 at 13:03, Dean Michael Berris <mik...@gm...> wrote: > Hi Jeroen, > > On Mon, Dec 14, 2009 at 5:42 PM, Jeroen Habraken <vex...@gm...> wrote: >> On Mon, Dec 14, 2009 at 10:20, Glyn Matthews <gly...@gm...> wrote: > [snip] >> >> I'm currently working on URI, and the HTTP part in specific, trying to >> make it more strict, RFC compliant. The query and fragments should be >> working now, the path is still a bit of a pain. I'll keep you up to >> date, and expect a patch sometime soon :) >> > > Cool, please either fork the library on Github or send a git patch > later on. I will be freezing the Subversion repository tomorrow. > > Have a good day! > > -- > Dean Michael Berris > blog.cplusplus-soup.com | twitter.com/mikhailberis > linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > Hi, I've decided to roll an initial patch, please find it attached. It fixes the following: - stricter RFC compliant parsing of the scheme, in the generic URI - It converts the scheme to lower case, as it states the following in the RFC, "For resiliency, programs interpreting URI should treat upper case letters as equivalent to lower case in scheme names" - I've changes the parser of the port to use ushort_ and uint16_t, the RFC specifies the port as *digit, but I think it should be limited to the valid network ports, thus 0 <= port <= 2**16 - The query and fragment are now parsed conform to the RFC I believe, I'd like to change this later to parse the query into a std::list<std::pair<string_type, string_type> > Note that the way the current parser works, it guarantees that if the URI is valid, the URI decoding can do with a lot less checks, I don't know whether this is a good idea though. Jeroen |