comparison src/luan/modules/IoLuan.java @ 787:c49980cdece6

use incremental cloning to serve web pages
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 04 Sep 2016 00:18:00 -0600
parents 1a68fc55a80c
children 9c13a15a4002
comparison
equal deleted inserted replaced
786:fe63c508a177 787:c49980cdece6
683 String location = name.substring(i+1); 683 String location = name.substring(i+1);
684 LuanTable schemes = schemes(luan); 684 LuanTable schemes = schemes(luan);
685 LuanFunction opener = (LuanFunction)schemes.get(luan,scheme); 685 LuanFunction opener = (LuanFunction)schemes.get(luan,scheme);
686 if( opener == null ) 686 if( opener == null )
687 throw new LuanException( "invalid scheme '"+scheme+"' in '"+name+"'" ); 687 throw new LuanException( "invalid scheme '"+scheme+"' in '"+name+"'" );
688 return (LuanTable)Luan.first(opener.call(luan,new Object[]{location,options})); 688 boolean isLocked = luan.isLocked; // hack needed for luan scheme functions
689 luan.isLocked = false;
690 try {
691 return (LuanTable)Luan.first(opener.call(luan,new Object[]{location,options}));
692 } finally {
693 luan.isLocked = isLocked;
694 }
689 } 695 }
690 696
691 public static final class LuanSocket extends LuanIO { 697 public static final class LuanSocket extends LuanIO {
692 public final Socket socket; 698 public final Socket socket;
693 699