From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2008-02-02 12:14:07


Marshall Clow wrote:
> I am in need of a library to parse/encode/decode URLs.
> A quick look through the boost tree doesn't yield any obvious candidates.
>
> Before I dive into writing my own, does anyone have any
> pointers/recommendations?

My effort at an HTTP request parser using Spirit is here:

   http://svn.chezphil.org/libpbe/trunk/src/Request.cc

The bit for URL parsing starts with the rule for absolute_uri, I think.

I built this from EBNF in RFCs 2616 and 2396. Unfortunately, these
have bugs which remain unfixed after 8 years! Presumably most HTTP
implementers are not using the EBNF as the basis of their parsers....

Phil.