caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
To: <amata@tsc.uc3m.es>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] The CGI library
Date: Fri, 13 Jun 2003 09:34:13 +0200	[thread overview]
Message-ID: <16105.32373.538224.903996@gargle.gargle.HOWL> (raw)
In-Reply-To: <32737348f9.348f932737@tsc.uc3m.es>


 >   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


      reply	other threads:[~2003-06-13  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-08 11:43 amata
2003-06-13  7:34 ` Jean-Christophe Filliatre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16105.32373.538224.903996@gargle.gargle.HOWL \
    --to=jean-christophe.filliatre@lri.fr \
    --cc=amata@tsc.uc3m.es \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).