From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E2793BC69 for ; Fri, 30 Mar 2007 18:34:49 +0200 (CEST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2UGYn3V009925 for ; Fri, 30 Mar 2007 18:34:49 +0200 Received: by mu-out-0910.google.com with SMTP id w9so540246mue for ; Fri, 30 Mar 2007 09:34:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=OvqGu9mk8gpwUV+kJZlw+acf1JyxUIykZQZON/9/OYJx1rYyrAjv3oEg0c9ez/+shgZQ4/6ZleQhWrp9h29i+Y+uqSJxeE+GiDbWC9u9wtnGAMobOU6smjqjcK9OgbiphikKvHlREwKtjFOIOqL7/UwYt2pw2FSGaBSMQ7gLhUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=JI5OqRcCrDyCdj9M6uNVt2eCxChRk6zmSdXS2d9G7six1jH0w8pSG026+dumPG1SGsaa91nk7mm0+7wgiOB+I42a/F6B+3FoNFD4mv/YZfqslSPTZ7cBu3kXPwXtca+C9KGI372U7aLcKr0Rois57tmYpzxpB1dppPTVEmTckMw= Received: by 10.82.162.14 with SMTP id k14mr4235829bue.1175272488762; Fri, 30 Mar 2007 09:34:48 -0700 (PDT) Received: from ?192.168.1.34? ( [88.7.143.102]) by mx.google.com with ESMTP id c24sm1832372ika.2007.03.30.09.34.45; Fri, 30 Mar 2007 09:34:48 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Gerd Stolpmann Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: nethttpd: Describing handlers with netcgi2 Date: Fri, 30 Mar 2007 17:34:41 +0100 To: Caml List X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 460D3C29.001 on concorde : j-chkmail score : XXXX : 5/20 2 0.000 -> 4 X-Miltered: at concorde with ID 460D3C29.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; netcgi:01 netcgi:01 ocamlfind:01 ocamlc:01 -package:01 netstring:01 -thread:01 -linkpkg:01 buffered:01 conditionals:01 ocamlnet:01 factory:98 plex:98 factory:98 sourceforge:01 I'm trying to compile the netplex example with netcgi2 instead of netcgi1. I get make netplex ocamlfind ocamlc -o netplex -package "netstring,netcgi2,unix,nethttpd- for-netcgi2,netplex" \ -thread netplex.ml -linkpkg -g File "netplex.ml", line 178, characters 48-55: This expression has type Netcgi.cgi_activation -> unit but is here used with type (#Netcgi1_compat.Netcgi_types.cgi_activation as 'a) -> unit The stumbling block is the dyn_handler assignment below. let adder = { Nethttpd_services.dyn_handler = (fun _ -> process); dyn_activation = Nethttpd_services.std_activation `Std_activation_buffered; dyn_uri = None; (* not needed *) dyn_translator = (fun _ -> ""); (* not needed *) dyn_accept_all_conditionals = false; } in let nethttpd_factory = Nethttpd_plex.nethttpd_factory ~handlers:[ "adder", adder ] () in Looking at the porting guide[1] I gather that this chunk (* This is [netcgi1] code! *) let cgi = new Netcgi.std_activation() in process cgi should be replaced with this (* This is [netcgi2] code! *) Netcgi_cgi.run process What should I plug in instead of process into dyn_handler, though? Thanks in advance, Joel [1] http://ocamlnet.sourceforge.net/manual-2.2/Netcgi_porting.html -- http://wagerlabs.com/