From: Jeroen H. <vex...@gm...> - 2010-02-04 21:48:27
|
Hi, On Thu, Feb 4, 2010 at 22:11, Nelson, Erik - 2 <eri...@ba...> wrote: > > On Thursday, February 04, 2010 3:33 PM Jeroen Habraken > [mailto:vex...@gm...] wrote: > >>There's this, > http://github.com/mikhailberis/cpp-netlib/blob/0.5/libs/network/example/ > uri.cpp >>which uses http::uri, but it isn't much. The URI tests might offer some > insight too, >>those can be found at > http://github.com/mikhailberis/cpp-netlib/blob/0.5/libs/network/test/url > _test.cpp. > > > Okay, I'm playing around with it a little bit... If I use a > URL like http://localhost:8000/test?arg=5 against the hello_world_server > example, and in the handler do something like > > boost::network::uri::http::uri http_uri(request.uri) > > the request.uri is something like "/test?arg=5" and http_uri.valid() is > false... Is this expected? I would have guessed that request.uri would > parse okay. Is there some support for pulling apart the query string > (separating the path from the arguments)? > > Thanks > > Erik > I can't reproduce this behaviour with the http::uri parser in netlib 0.5, so I'm uncertain where this goes wrong. I've added the test as a trivial example of how to use http::uri. Jeroen |