Version française
Home     About     Download     Resources     Contact us    
Browse thread
CamlGI question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christopher Alexander Stein <stein@e...>
Subject: Re: [Caml-list] CamlGI question

Je pense qu'aujourd'hui, une interface fonctionnante de CGI est
presque aussi important pour une langue d'usage universel qu'un
générateur exécutable de A.OUT ou ELF. Une interface de base de
données (MySQL) suit de près derrière.

Lex

On Tue, 19 Apr 2005, Christophe TROESTLER wrote:

> On Mon, 18 Apr 2005, Mike Hamburg <hamburg@fas.harvard.edu> wrote:
> >
> > Is CamlGI still actively maintained?  I'm writing a CGI/FastCGI
> > program using it, and have been having some trouble with the library.
>
> It is -- I just do not have much time to care about it.
>
> > http://capricorn.dnsalias.org/mike/index/
>
> I downloaded your files.  For a start, all the modules are -pack'ed
> into camlGI.cm[x]a, so you only need to link with that file.  Also,
> the interface of the library is in camlGI.mli with complete
> documentation.  In particular, you should not use hidden submodules:
> e.g. in "path.ml", say [open CamlGI] and then [Cgi.HttpError] instead
> of [Cgi_types.HttpError].  Same in "index.ml": you should say [open
> CamlGI.Cgi], not [open Cgi].
>
> [Request.metavar rq.rq "SERVER_NAME"] can simply be replaced with
> [Request.server_name rq.rq]
>
> [cgi#header_was_emitted ()]: such method does not exist in the public
> interface.
>
> I do not see why you set [rq=request] as the request can be gotten
> from the cgi object [cgi#request].
>
> > When used as a FastCGI, the indexing script hangs, [...] It is quite
> > clear that the script has finished by the time the hang occurs
>
> Do the examples provided with the lib work as they should?
>
> Are you sure your [main] function actually terminates?  Indeed, the
> output is buffered (at least by CamlGI) and may not be fully outputted
> until the script finishes.  Also, if you wish to launch a new
> process/thread per request, be sure to use the [fork] optional
> parameter to [handle_requests ?fork f conn] -- otherwise [f] will
> return immediately and the output "channel" will be closed early.
>
> CamlGI follows closely the spec -- even the multiplexing part which is
> not implemented by many.
>
> > The plain CGI version works just fine
>
> CGI output is not buffered.
>
> > the features of the script only work in the FastCGI version, such as
> > thumbnailing.
>
> Why is that?  Do you need persistence for that?
>
> Hope it helps.  If it does not, send me an example (if possible
> minimal but definitely self-contained) that exhibits the undesired
> behavior and I'll have a look.
>
> ChriS
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>