Re: fcgi

Eric Stokes <[email protected]> Fri, 9 Dec 2005 08:46:30 -0800
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
On Dec 9, 2005, at 6:04 AM, Gerd Stolpmann wrote:

> Am Donnerstag, den 08.12.2005, 21:12 -0800 schrieb Mika Illouz:
>> Hi Gerd,
>>
>> I've been starting to use your ocaml modules, which appear at first
>> glance to be very well crafted pieces of software.  Thanks for your
>> contribution.
>>
>> I have one question regarding the non-raw fast-cgi module: Is it
>> possible using that interface (Netcgi_fcgi) to augment the list of
>> permitted_input_content_types with "text/xml"?  I would need that for
>> handling xml-rpc POST's.  If it is not possible, I suppose I could
>> just use Netcgi_fcgi_10 and dress it up as needed.
>
> Hi Mika,
>
> it seems it is not possible to pass a cgi_config when one invokes  
> fcgi.
> We just overlooked that. If you look into netcgi_fcgi.ml, there is one
> line
>
> let env = new Netcgi_env.custom_environment ()
>
> This constructor accepts also an optional argument cgi_config, and if
> missing, the default config is taken which does not permit text/xml.
>

This was indeed overlooked. I propose adding an optional argument to  
setup_env which allows to specify the cgi_config.

> The other question is how the POST data should be processed.  
> Currently,
> in netcgi.ml there is a hard-coded match of the content-type against
> application/x-www-form-urlencoded and multipart/form-data, and all  
> other
> types are rejected. I don't know very much about xml-rpc, but I guess
> the POST data consists of the serialized rpc call, and netcgi should
> simply handle it as opaque data (as it is already done for PUT data).
>
> These changes look all very easy, and before you call low-level layers
> of netcgi directly, I think it is better to change the higher-level
> parts.
>
> Gerd
> -- 
> ------------------------------------------------------------
> Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
> [email protected]          http://www.gerd-stolpmann.de
> Telefon: 06151/153855                  Telefax: 06151/997714
> ------------------------------------------------------------
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click