Bug 51231 - Support running ap_regexec on strings that are not NULL terminated (buckets)
Summary: Support running ap_regexec on strings that are not NULL terminated (buckets)
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.17
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 51258
  Show dependency tree
 
Reported: 2011-05-19 11:51 UTC by horowity@checkpoint.com
Modified: 2011-06-15 23:23 UTC (History)
1 user (show)



Attachments
Add API to run ap_regexec on strings that are not NULL terminated. (1022 bytes, patch)
2011-05-19 11:59 UTC, horowity@checkpoint.com
Details | Diff
Fix compilation error of prev fix (1020 bytes, patch)
2011-05-19 12:10 UTC, horowity@checkpoint.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description horowity@checkpoint.com 2011-05-19 11:51:24 UTC
When working in filter context, you cannot run regular expression on bucket content (so I have the buffer length).

Currently you 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)
Comment 1 horowity@checkpoint.com 2011-05-19 11:59:08 UTC
Created attachment 27035 [details]
Add API to run ap_regexec on strings that are not NULL terminated.
Comment 2 horowity@checkpoint.com 2011-05-19 12:10:57 UTC
Created attachment 27036 [details]
Fix compilation error of prev fix

Sorry for the compilation error.
Comment 3 Stefan Fritsch 2011-05-21 20:34:12 UTC
Commited to trunk with minor tweaks as r1125802