httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38355] - DSO support for mod_rewrite
Date Mon, 23 Jan 2006 12:32:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38355>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38355





------- Additional Comments From jacob.rief@tiscover.com  2006-01-23 13:32 -------
(In reply to comment #0)
> This feature enhancement for mod_rewrite adds support for an external
> rewrite-program which links dynamically to mod_rewrite instead of communicating
> through a pipe, such as RewriteMap prg:/path/to/map_program
> This feature can be useful in conditions, where external rewrite programs may
> hang. And if they hang, all of the httpd-processes which have to consult the
> external mapping programm will hang too, causing a denial of service. Using
> dso-support for RewriteMap allows to write more complicated and time consuming
> mapping-applications, for instance to connect to database-servers and/or to
> search objects on Squid-Caches using ICP.

(In reply to comment #1)
> I don't understand. Since httpd 2.0 it is possible to write regular modules (dso
> or static) which extend mod_rewrite. How is that different?

(In reply to comment #2)
Using RewriteMap dso:/path/to/module.so is much easier, than writing a full
Apache module. Have a look at the example on the associated webpage. Writing
such modules is just as easy as writing an external program, however without the
restriction such external programs have. The Squid-Cache for instance allows to
spawn more than one external rewrite-program, and pipes the request to the next
idle program. Apache on the other side allows only one such program, which when
busy, blocks all the other Apache-slots requireing a dynamic rewriting. Remember
what is written about the external rewrite program in the 'URL Rewriting Guide'
---
be very careful:
   1. ``Keep it simple, stupid'' (KISS), because if this program hangs it will
hang the Apache server when the rule occurs.
   2. Avoid one common mistake: never do buffered I/O on stdout! This will cause
a deadloop! Hence the ``$|=1'' in the above example...
   3. Use the RewriteLock directive to define a lockfile mod_rewrite can use to
synchronize the communication to the program. By default no such synchronization
takes place.
---
with this modrewrite-dso-patch you can bypass item 1, 2 and 3.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message