httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yehezkel Horowitz <>
Subject RE: ap_regexec API for buffers (not NULL terminated strings)
Date Thu, 19 May 2011 11:24:30 GMT
I have a patch (based on 2.2.17) to where should I submit it?

From: Graham Leggett []
Sent: Thursday, May 19, 2011 2:23 PM
Cc: Anatoli Tubman; Ethan Schorer
Subject: Re: ap_regexec API for buffers (not NULL terminated strings)

On 19 May 2011, at 1:06 PM, Yehezkel Horowitz wrote:

Can anyone explain why ap_regexec can take only NULL terminated string?

I'm working in filter context and want to run regular expression on bucket content (so I have
the buffer length).

Currently I had to copy the bucket content and add the NULL at the end before passing it to
ap_regexec (this is a waste of CPU and memory).

The underling PCRE engine support getting the length of the input string (actually ap_regexec
just run strlen on the string and pass the result to pcre_exec)

Can you consider adding API for this? (Of course it will get the input length as argument)

Similar request (from 2002) could be found at
but without any reply.

Sounds like a sensible thing to have.

Is there a patch for this anywhere that we can take a look at, or is this just a suggestion
at this point?


Scanned by Check Point Total Security Gateway.

View raw message