You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/08/26 22:25:31 UTC

DO NOT REPLY [Bug 36390] New: - Comment Stripping

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=36390>.
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=36390

           Summary: Comment Stripping
           Product: Apache httpd-1.3
           Version: HEAD
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_include
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: hgleaves@mail.acponline.org


Include a configurable feature that enables the HTTP server to dynamically strip
comments from input files, like html, css etc.

Since such comemnts are primarily intended for development staff that work on
these files and that the number of bytes to transmit is reduced, this is an
attractive way to manage this activity.

If possible a caching algorithm could be introduced (unless one exists already,
I am unfamilair with the Apache design and internals) that caches the stripped
files data and that can be "re-served" whenever that resources is re-requested
(with the usual consideration given to "stale" processing etc).

Furthernore the performance gain in not transmitting the comment bytes, would
offset (to some degree) the cost incurred by the lexical analysis and stripping
operation, and conceivably might even lead to a performance increase for heavily
commented files.

I can conceive of at least these potentially very useful configuration options:

1. Set a default strip_mode (on/off)
2. Apply the default strip_mode for clients whose IP is within a specified
range. (this allows internal testers to see coments but external users to not
see them).
3. Support strip types: full (every comment byte and delimiter removed), blanked
(replace comments including delimiters, with spaces) and obfuscated (retain
delimiters but replace every other char/space with a "X").

These options allows one to at least see that comments are in place or that
comments are being forcibly blanked, all of these are useful under
development/testing/support conditions).

I was informed by a regular Apache contributor that mod_include.c might be an
ideal place to implement such a change and that some degree of lexical
processing already exists, that it might be a "small" change.

Although doing this processing might be considred by some, to be redundant,
inelegant etc, it is configurable so nobody would be forced to use this, rather
individual users sights would have the option if they ever needed it and such
features can be very very useful for some users in some scenarios.

Thanks

-- 
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