You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Phil Endecott <sp...@chezphil.org> on 2005/12/30 17:43:46 UTC

[users@httpd] Generate 304 (not modified) response with mod_ext_filter

Dear All,

I'm using mod_ext_filter to convert SVG files to PNG on the fly.  It 
looks something like this:

ExtFilterDefine render_svg_filter mode=output \
intype=image/svg+xml outtype=image/png \
cmd="/usr/local/bin/rsvg_filter.sh"

where rsvg_filter is something like:

#!/bin/sh
tmpinfile="/tmp/rsvg.$$.dt"
tmpoutfile="/tmp/rsvg.$$.png"
cat > $tmpinfile
rsvg $tmpinfile $tmpoutfile
cat $tmpoutfile
rm $tmpoutfile $tmpinfile


This works well.

Unfortunately, it looks as if the PNGs that this generates are not being 
cached by the browser.  Presumably the browser is sending an 
if-modified-since header; I'd like to compare the if-modified-since date 
with the timestamp on the .svg file, and return a 304 not modified 
response if nothing has changed.

(I'm not sure how this interacts with Etags.)

Is there a way to do this?

Thanks for any ideas.

--Phil.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org