httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <>
Subject Re: data types in CGI
Date Fri, 17 May 1996 17:13:32 GMT
> > I'm working on some module code that is doing quite a bit of
> > forms generation. One thing that I am finding very frustrating
> > about working in C with the CGI interface is the conversion of
> > everything to and from string types.
> > 
> > Is it a ludicrous consideration to possibly extend the CGI
> > spec to allow preservation of integer types? Is there something
> > I'm missing?
> Probably. It'd need CGI variables to be passed by clients with
> type information.
> e.g.  (int)age=10&(char)name=foo
> because Apache wouldn't know if something was meant to be a string or
> an integer, and guessing is a bad idea....
> least_favourite_film=10&favourtite_film=jaws

To make things backword compatible, it would be logical to treat
everything as a string as it has been. However, for things that
were explictly typed as int (possibly with a DTYPE attribute), it
could be passed as something like: (obviously an error in your example)


> What ya' gonna do with "10" ?
> Now if you use perl.............

That's the problem... I have been using perl for some time and
have gotten a bit spoiled. Now I have a need to do it in C.

View raw message