strips all logging code from mod_rewrite. This is meant as a performance
improvement for production sites, not as a recommended compiler option
for public distributions.
At least conceptionally this was
Reviewed by: Justin Erenkrantz, Mads Toftum, Thom May,
David Burry <dburry@tagnet.org>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100904 13f79535-47bb-0310-9956-ffa450edef68
If we have only small expansions (like just one variable - often used
in map keys or the like), don't stress the pool with allocating
memory for the linked result pointer list. This list can be safely
stored on the stack.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100901 13f79535-47bb-0310-9956-ffa450edef68
- the if(s) check is superfluid. s is guaranteed to be non-NULL
(except for out of memory)
- strtok as late as possible to save some cycles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100892 13f79535-47bb-0310-9956-ffa450edef68
- avoid unnecessary memory operations
- parse non-regex patterns at configuration time, which
- gives the ability to throw a useful warning, where [NC] is not supported
- and speeds up processing at runtime
- allow [NC] for simple comparison pattern (=)
- improve readability
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100862 13f79535-47bb-0310-9956-ffa450edef68
- map designations are now case insensitive (txt: rNd: PRG: INt:)
- maps may be relative to serverroot, which appears to be _very_
helpful
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100860 13f79535-47bb-0310-9956-ffa450edef68
- make it compile time configurable, how long
a response from a rewrite map prg may be.
- avoid unnecessary memory operations
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100832 13f79535-47bb-0310-9956-ffa450edef68
- shorten the code
- improve efficiency and readability
- get a rid of fixed buffers
- use %pp format string for pointers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100827 13f79535-47bb-0310-9956-ffa450edef68
REWRITELOCK_MODE wasn't used anymore for ages. In the meantime it defined
the mode of the rewritelog (sic!) file. So fix the misnaming and
use constants for mode and open flags.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100813 13f79535-47bb-0310-9956-ffa450edef68
use sizeof where sizeof should be used.
don't compute strlen again and again (use the supplied value
from apr_strftime instead).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100810 13f79535-47bb-0310-9956-ffa450edef68
The new map-cache consists of a simple two-tiered apr_hash structure.
cachep->maps contains entries for each map, which point to a hash with
the actual values (map->entries).
Each map->entries hash lives in a subpool of cachep->pool.
The mtime is stored per map and if the map expires, we just clear
map->pool and create a fresh map->entries hash structure.
This removes a big chunk of code from mod_rewrite, improves readability and
even the memory footprint of the cache.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100801 13f79535-47bb-0310-9956-ffa450edef68
- use switch instead of if-else chain
- collapse txt/rnd code, which is essentially the same
- make it better readable at all.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100795 13f79535-47bb-0310-9956-ffa450edef68
reorder the code in mod_rewrite.c in order to get a rid of
the forward declaration. Cleaned up the comments as well.
No real code change, but a quite big diff ...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100792 13f79535-47bb-0310-9956-ffa450edef68
The generic flagparser (read: lexer) for RewriteRules and RewriteConds
does the same except for one function call.
Collapse these to functions to one and make the result more
readable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100772 13f79535-47bb-0310-9956-ffa450edef68