From 009760bdb7ba08246b98f4befe856cbda2ce769a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Jun 2010 07:37:13 +0000 Subject: ext: comment why we do what we do in to_path --- ext/clogger_ext/clogger.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c index cc08fac..ad5bbb9 100644 --- a/ext/clogger_ext/clogger.c +++ b/ext/clogger_ext/clogger.c @@ -824,6 +824,11 @@ static VALUE to_path(VALUE self) else rv = stat(cpath, &sb); + /* + * calling this method implies the web server will bypass + * the each method where body_bytes_sent is calculated, + * so we stat and set that value here. + */ c->body_bytes_sent = rv == 0 ? sb.st_size : 0; return path; } -- cgit v1.2.3-24-ge0c7