--- loncom/interface/loncommon.pm 2005/11/22 00:01:41 1.298 +++ loncom/interface/loncommon.pm 2005/11/22 22:33:01 1.299 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.298 2005/11/22 00:01:41 raeburn Exp $ +# $Id: loncommon.pm,v 1.299 2005/11/22 22:33:01 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3486,7 +3486,10 @@ sub no_cache { sub content_type { my ($r,$type,$charset) = @_; - &no_cache($r); + if ($r) { + # Note that printout.pl calls this with undef for $r. + &no_cache($r); + } if ($env{'browser.mathml'} && $type eq 'text/html') { $type='text/xml'; } unless ($charset) { $charset=&Apache::lonlocal::current_encoding;