Version franēaise
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] The CGI library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-06-13 (07:36)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] The CGI library

 >   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:

   where  strings  (arguments  and   values)  must  be  encoded  using

2. or you want to call the second CGI when running the first one; then
   you must set the according environment variables:
   - 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 (

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: