[PATCH] Add PCRE support

Jos I. Boumans jos at dwim.org
Tue Oct 20 10:41:40 CEST 2009


On Oct 20, 2009, at 9:53 AM, Tollef Fog Heen wrote:

> ]] Dag-Erling Smørgrav
> | Tollef Fog Heen <tfheen at redpill-linpro.com> writes:
> | > We no longer use POSIX style regexes, but rather PCRE regexes.   
> This
> | > introduces a hard dependency on libpcre.
> |
> | This is a radical departure from one of the basic design  
> objectives for
> | Varnish, which was that it should be possible to compile it with  
> nothing
> | more than a C compiler and headers for a more or less POSIX- 
> compatible C
> | library.
> I don't agree it's a radical departure, but I'd rather not end up in a
> straw-splitting discussion about that. :-)
> It's something that we agreed on doing during the Varnish user group
> meeting (as documented on
> http://varnish.projects.linpro.no/wiki/VUG1Report), as well as having
> been discussed extensively on IRC already.

It indeed adds an external dependency, but I'm not quite  
understanding why
you  may think that's a bad thing.

Are you worried about systems that aren't able to provide/build libpcre
and stop varnish from working?

Or are you worried about third party code that may introduce bugs or  

Or is there perhaps another reason I hadn't thought of?

For all those at the VUG, the use and benefit of PCRE over POSIX  
regexes was
quite apparent at least, and surely we don't want to implement our  
own version
of PCRE. But perhaps there's a risk we didn't see.

Would you care to elaborate?


	Jos Boumans

	"Whenever you find you are on the side of the majority,
	it is time to pause and reflect." - Mark Twain

More information about the varnish-dev mailing list