[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 16 Jan 2007 22:08:48 -0000


albertel		Tue Jan 16 17:08:48 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - commit some ideas to fixup repcopy_userfile to handle large files
  
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.824 loncom/lonnet/perl/lonnet.pm:1.825
--- loncom/lonnet/perl/lonnet.pm:1.824	Sat Jan 13 21:01:16 2007
+++ loncom/lonnet/perl/lonnet.pm	Tue Jan 16 17:08:48 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.824 2007/01/14 02:01:16 raeburn Exp $
+# $Id: lonnet.pm,v 1.825 2007/01/16 22:08:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7143,6 +7143,10 @@
 	if ($lwpresp ne 'ok') {
 	    my $ua=new LWP::UserAgent;
 	    my $request=new HTTP::Request('GET',&tokenwrapper($uri));
+	    # FIXME, right reads everything into memory then writes it out
+	    # doing something like
+	    # 	    my $response=$ua->request($request,$file);
+	    # would make this write directly to disk
 	    my $response=$ua->request($request);
 	    if ($response->is_success()) {
 		$info=$response->content;