bug in esi:include handling (with patch)

Bob MacCallum r.maccallum at imperial.ac.uk
Wed Nov 18 11:32:49 CET 2009


Hi,

I found an off-by-one bug in esi_handle_include() - ESI requests were being
made for URLs with one extra character that was left over from the previous
request.


diff -Naur varnish-2.0.5-orig/bin/varnishd/cache_vrt_esi.c varnish-2.0.5/bin/varnishd/cache_vrt_esi.c
--- varnish-2.0.5-orig/bin/varnishd/cache_vrt_esi.c     2009-11-09 09:04:55.000000000 +0000
+++ varnish-2.0.5/bin/varnishd/cache_vrt_esi.c  2009-11-18 10:17:30.000000000 +0000
@@ -383,7 +383,7 @@
                        c = WS_Alloc(ws, s);
                        memcpy(c, val.b, Tlen(val));
                        val.b = c;
-                       val.e = val.b + s;
+                       val.e = val.b + s - 1;
                        *val.e = '\0';
                }
 

If you'd like me to add the ticket, please send the Trac login info off list.

Many thanks for this interesting looking project.

FYI I am trying to embed bioinformatics services (a mixture of apache
mod_perl, tomcat java and other stuff) into a single drupal instance (I'm
"pass"ing everything through at the moment - will think about caching later).
It's looking hopeful at the moment!

cheers,
Bob.


-- 
Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups |
Division of Cell and Molecular Biology | Imperial College London |
Phone +442075941945 | Email r.maccallum at imperial.ac.uk



More information about the varnish-dev mailing list