Bug#307966: munin: cgi mode says 304 to an If-Modified-Since request

2007-09-27 Thread Nicolai Langfeldt
Hi,

Patch folded into upstream r1340.  Fully recommend that the whole new
munin-cgi-graph is imported into debian though, it should prove much
quicker, nicer and better (and even less tested, but munin-cgi-graph
appears to be very sparsely used).

Regards,
  Nicolai



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#307966: munin: cgi mode says 304 to an If-Modified-Since request

2007-02-07 Thread Lucas Nussbaum
tag 307966 + patch
retitle 307966 munin: cgi mode says 304 to an If-Modified-Since request 
(makes CGI mode mostly unusable)
thanks

On 29/11/06 at 13:25 +0100, Richard van den Berg wrote:
 If just got bitten by this bug, but the fix was quite easy. The problem
 was that the cgi script only decides to answer positive to
 if-modified-since requests if the png on disk has changed. When you
 are using graph_strategy=cgi, that will never happen. So a check for the
 current time is also needed.

Hi Richard,

Thanks for your patch. I just got bitten by this bug. It would be great
if this could be fixed in etch...

Lucas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#307966: munin: cgi mode says 304 to an If-Modified-Since request

2006-11-29 Thread Richard van den Berg
If just got bitten by this bug, but the fix was quite easy. The problem
was that the cgi script only decides to answer positive to
if-modified-since requests if the png on disk has changed. When you
are using graph_strategy=cgi, that will never happen. So a check for the
current time is also needed.

I'll submit this to upstream as well, if I can find the right place.

Sincerely,

Richard van den Berg

--- munin-cgi-graph.in.bak  2006-11-29 13:08:31.0 +0100
+++ munin-cgi-graph.in  2006-11-29 13:18:22.0 +0100
@@ -84,7 +84,8 @@
 my $slast_modified = strftime (%a, %d %b %Y %H:%M:%S %Z, localtime 
($sstats[9]));
 
 if (defined $ENV{HTTP_IF_MODIFIED_SINCE} and 
-   !modified ($ENV{HTTP_IF_MODIFIED_SINCE}, $sstats[9]-1))
+   !modified ($ENV{HTTP_IF_MODIFIED_SINCE}, $sstats[9]-1) and
+   !modified (gmtime(time+($period{$scale}-($time%$period{$scale}))), 
$sstats[9]-1))
 {
print Status: 304\n;
print Content-Type: image/png\n;