(file) Return to browser.cgi CVS log (file) (dir) Up to [app-findlib-browser] / browser.cgi

Diff for /browser.cgi between version 4 and 10

version 4, Sun Aug 1 11:39:35 2004 UTC version 10, Mon Aug 2 01:01:07 2010 UTC
Line 1 
Line 1 
 #! /bin/sh  #! /bin/sh
 # (*  # (*
 exec /opt/godi/bin/ocaml "$0" "$@"  exec /opt/godi-3.11-ocamlnet3/bin/ocaml "$0" "$@"
 *) directory ".";;  *) directory ".";;
   
 (* $Id$  (* $Id$
Line 12 
Line 12 
 #require "findlib";;  #require "findlib";;
 #require "unix";;  #require "unix";;
 #require "str";;  #require "str";;
 #require "cgi";;  #require "netcgi2";;
   
 (*-CUT-*)  (*-CUT-*)
   
 (* ---------------------------------------------------------------------- *)  (* ---------------------------------------------------------------------- *)
   
 let cgi = new Netcgi.std_activation  let buffered_transactional_optype =
             ~operating_type:Netcgi.buffered_transactional_optype ();;    `Transactional (fun config ch -> new Netchannels.buffered_trans_channel ch)
   
   module type CGI = sig val cgi : Netcgi.cgi end
   
   module Body(Cgi : CGI) = struct
   
     let cgi = Cgi.cgi
   
 let param n = (cgi # argument n) # value;;  let param n = (cgi # argument n) # value;;
   
Line 228 
Line 234 
   
   (*** headline ***)    (*** headline ***)
   
   print "content-type: text/html\n\n";      cgi # set_header();
   print "<html><head><title>Objective Caml Packages</title></head>\n";    print "<html><head><title>Objective Caml Packages</title></head>\n";
   print "<body bgcolor=white>\n";    print "<body bgcolor=white>\n";
   print "<h1>Objective Caml Packages</h1>\n";    print "<h1>Objective Caml Packages</h1>\n";
Line 454 
Line 460 
   action()    action()
 with  with
   e ->    e ->
     print "content-type: text/html\n\n";          cgi # set_header();
     print "<html><body><h1>Software error</h1>\n";      print "<html><body><h1>Software error</h1>\n";
     print (Printexc.to_string e);      print (Printexc.to_string e);
     print "</body></html>\n";      print "</body></html>\n";
 end;  end;
 commit()  commit()
   end
   
   let () =
     Netcgi_cgi.run
       ~output_type:buffered_transactional_optype
       (fun cgi ->
          let module Cgi = struct let cgi = cgi end in
          let module B = Body(Cgi) in
          ()
       )


Legend:
Removed from v.4  
changed lines
  Added in v.10

SVN admin
Powered by
ViewCVS 1.0-dev