--- loncom/interface/loncommon.pm 2004/02/18 15:40:23 1.180 +++ loncom/interface/loncommon.pm 2004/02/18 23:33:17 1.181 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.180 2004/02/18 15:40:23 matthew Exp $ +# $Id: loncommon.pm,v 1.181 2004/02/18 23:33:17 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2593,11 +2593,16 @@ sub no_cache { } sub content_type { - my ($r,$type,$charset) = @_; - unless ($charset) { - $charset=&Apache::lonlocal::current_encoding; - } - $r->content_type($type.($charset?'; charset='.$charset:'')); + my ($r,$type,$charset) = @_; + unless ($charset) { + $charset=&Apache::lonlocal::current_encoding; + } + if ($charset) { $type.='; charset='.$charset; } + if ($r) { + $r->content_type($type); + } else { + print("Content-type: $type\n\n"); + } } =pod