Bug 56284

Summary: Extend mod_proxy_html to rewrite URLs in CSS documents too
Product: Apache httpd-2 Reporter: Micha Lenk <micha>
Component: mod_proxy_htmlAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: nsg-apache-httpd-maintenance
Priority: P2 Keywords: PatchAvailable
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 56288    
Attachments: Extends mod_proxy_html to rewrite URLs in whole CSS documents too

Description Micha Lenk 2014-03-19 20:38:47 UTC
Created attachment 31407 [details]
Extends mod_proxy_html to rewrite URLs in whole CSS documents too

I want to suggest to extend mod_proxy_html to rewrite URLs in CSS documents too. This is done by applying the configured regex and string replacements for the content of HTML tags also on whole CSS documents, i.e. documents with Content-Type: text/css.

The attached patch is based on httpd trunk, rev. 1579365.
Comment 1 Nick Kew 2014-06-01 17:00:54 UTC
This belongs in a separate module.  I wrote mod_line_edit for this and similar tasks, but since then both mod_substitute and mod_sed offer additional choices.  I think any improvement on those would probably imply a CSS-aware parser (indeed, I once contemplated doing it with libcroco, but wasn't convinced it was worth the effort).

If you want to make the case for your patch going within mod_proxy_html, can I suggest raising the subject on the dev list?