From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA14508; Fri, 13 Jun 2003 09:36:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA14216 for ; Fri, 13 Jun 2003 09:36:04 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h5D7a3T12852 for ; Fri, 13 Jun 2003 09:36:03 +0200 (MET DST) Received: from pc8-123 (pc8-123 [129.175.8.123]) by lri.lri.fr (8.11.6p2/jtpda-5.3.2) with ESMTP id h5D7YDt09205 ; Fri, 13 Jun 2003 09:34:15 +0200 (MEST) Received: from filliatr by pc8-123 with local (Exim 3.35 #1 (Debian)) id 19Qj4f-0000Ds-00; Fri, 13 Jun 2003 09:34:13 +0200 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <16105.32373.538224.903996@gargle.gargle.HOWL> Date: Fri, 13 Jun 2003 09:34:13 +0200 To: Cc: caml-list@inria.fr Subject: Re: [Caml-list] The CGI library In-Reply-To: <32737348f9.348f932737@tsc.uc3m.es> References: <32737348f9.348f932737@tsc.uc3m.es> X-Mailer: VM 7.03 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) X-MailScanner: Found to be clean X-Spam: no; 0.00; filliatre:01 lri:01 caml-list:01 filliatr:01 encode:01 blah:01 unix:02 encoded:02 receive:97 string:03 library:03 arguments:03 data:03 parse:04 arg:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I“m using the CGI library (developed for Jean-Christophe Filliātre) > in order to receive arguments in a CGI application. I use the > function "parse_args" for parse the CGI arguments. > > My problem is; I have a CGI application that must send data to > another CGI. How can I send arguments to another CGI? Is this possible > with the CGI library? What function should I use? There are two possible answers: 1. either you just want your first CGI to produce a web page containing a link to the second CGI with arguments; then the URL contains the CGI arguments, in such a way: http://www.blah.org/second.cgi?arg1=value1&arg2=value2&... where strings (arguments and values) must be encoded using Cgi.encode. 2. or you want to call the second CGI when running the first one; then you must set the according environment variables: - REQUEST_METHOD="GET" - QUERY_STRING="arg1=value1&arg2=value2&..." before calling the second CGI (where strings are also encoded using Cgi.encode.) You may use Unix.create_process_env to do this (or Unix.execvpe if you don't need to return to the first CGI) Hope this helps, -- Jean-Christophe Filliātre (http://www.lri.fr/~filliatr) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners