[LON-CAPA-cvs] cvs: loncom /auth restrictedaccess.pm
raeburn
raeburn at source.lon-capa.org
Sat Jun 1 22:20:33 EDT 2013
raeburn Sun Jun 2 02:20:33 2013 EDT
Modified files:
/loncom/auth restrictedaccess.pm
Log:
- Detect https or http.
Index: loncom/auth/restrictedaccess.pm
diff -u loncom/auth/restrictedaccess.pm:1.8 loncom/auth/restrictedaccess.pm:1.9
--- loncom/auth/restrictedaccess.pm:1.8 Fri Feb 13 17:20:26 2009
+++ loncom/auth/restrictedaccess.pm Sun Jun 2 02:20:33 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Passphrase Entry and Validation for Portfolio files
#
-# $Id: restrictedaccess.pm,v 1.8 2009/02/13 17:20:26 bisitz Exp $
+# $Id: restrictedaccess.pm,v 1.9 2013/06/02 02:20:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -55,7 +55,8 @@
$origurl);
$env{'request.state'} = "published";
$env{'request.filename'} = $origurl;
- $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$origurl);
+ my $newurl = &Apache::lonnet::absolute_url($ENV{'HTTP_HOST'}).$origurl;
+ $r->header_out(Location => $newurl);
return REDIRECT;
} else {
$msg = 'Invalid passphrase';
More information about the LON-CAPA-cvs
mailing list