httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject Overhauling mod_rewrite !!
Date Wed, 29 Oct 1997 16:23:16 GMT

Because today I had to fix a nasty bug in mod_rewrite related to substitution
strings which expand to http:// in per-directory context (see c.i.w.s.u) I was
forced to rewrite the complete apply_rewrite_rule() function from mod_rewrite.
This function is the hearth of mod_rewrite. I took this chance to overhaul it
completely by simplifying it greatly and documenting it very well. After this
change, the "cvs diff" was already horrible ;_)

Then I finished Roys intenting stuff and the "cvs diff" was even more
horrible. So, I though also about Roys second point that mod_rewrite is such
large and that we are still in beta cycle. Hmmm... then I decided to to the
last step of splitting(!) mod_rewrite the same way mod_proxy stays around,
because my changes (only layout and structure, not contents) were already huge
and when it gets not done _NOW_ it gets not done never. 

Hmmm... currently I'm not finished, but my new modules/rewrite/ directory
looks like this:

-rw-r--r--  1 rse  wheel   1459 Oct 29 16:29 Makefile
-rw-r--r--  1 rse  wheel    427 Oct 29 17:06 Makefile.tmpl
-rw-r--r--  1 rse  wheel   1857 Oct 29 17:05 README
-rw-r--r--  1 rse  wheel  18594 Oct 29 17:04 librewrite.a
-rw-r--r--  1 rse  wheel  15034 Oct 29 17:09 rewrite.h
-rw-r--r--  1 rse  wheel  30014 Oct 29 17:10 rewrite_apibase.c
-rw-r--r--  1 rse  wheel  23021 Oct 29 17:10 rewrite_apihook.c
-rw-r--r--  1 rse  wheel   3196 Oct 29 16:47 rewrite_cache.c
-rw-r--r--  1 rse  wheel  26345 Oct 29 16:54 rewrite_engine.c
-rw-r--r--  1 rse  wheel   8333 Oct 29 17:04 rewrite_engine.o
-rw-r--r--  1 rse  wheel   7254 Oct 29 16:26 rewrite_logfile.c
-rw-r--r--  1 rse  wheel  26430 Oct 29 16:49 rewrite_mapfile.c
-rw-r--r--  1 rse  wheel   9144 Oct 29 17:10 rewrite_misc.c
-rw-r--r--  1 rse  wheel   5170 Oct 29 16:10 rewrite_uri.c

Which is nice against the old 120 KB mod_rewrite.c monster.
Just one question: IS IT OK WHEN I FINISH THIS STEP FOR 1.3?

The final change (available at the end of the week!) would include:
   - splitting mod_rewrite as seen above or slightly different in filenames
   - fix to the recently discovered query-string problem
   - fix to the nasty http:// per-dir problem on rewritemaps
     which was only possible due to the complete rewrite of
   - finished intentation
   - ...some minor adjustments to the layout...

                                       Ralf S. Engelschall

View raw message