[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Mon May 28 11:02:07 EDT 2012
raeburn Mon May 28 15:02:07 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/lonnet/perl lonnet.pm
Log:
- For 2.11
- Backport 1.1173, 1.1174.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.1 loncom/lonnet/perl/lonnet.pm:1.1172.2.2
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.1 Fri May 25 14:30:52 2012
+++ loncom/lonnet/perl/lonnet.pm Mon May 28 15:02:06 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1172.2.1 2012/05/25 14:30:52 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.2 2012/05/28 15:02:06 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -75,6 +75,8 @@
use HTTP::Date;
use Image::Magick;
+use Encode;
+
use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir
$_64bit %env %protocol %loncaparevs %serverhomeIDs %needsrelease
%managerstab);
@@ -2567,12 +2569,12 @@
}
$request->header(Cookie => $ENV{'HTTP_COOKIE'});
- my $response=$ua->request($request);
-
+ my $response= $ua->request($request);
+ my $content = Encode::decode_utf8($response->content);
if (wantarray) {
- return ($response->content, $response);
+ return ($content, $response);
} else {
- return $response->content;
+ return $content;
}
}
@@ -3958,7 +3960,7 @@
sub load_all_first_access {
my ($uname,$udom)=@_;
if (($cachedkey eq $uname.':'.$udom) &&
- (abs($cachedtime-time)<5)) {
+ (abs($cachedtime-time)<5) && (!$env{'form.markaccess'})) {
return;
}
$cachedtime=time;
More information about the LON-CAPA-cvs
mailing list