Debian bug report logs - #1126
/usr/sbin/cgiparse -form doesn't work
Package: cern-httpd; Reported by: rdr@tad.micro.umn.edu (Raul Miller); 104 days old.
Message received at debian-bugs:
From tad.micro.umn.edu!rdr Wed Jul 19 16:36:16 1995
Return-Path: <rdr@tad.micro.umn.edu>
Received: from pixar.com by mongo.pixar.com with smtp
(Smail3.1.28.1 #15) id m0sYif2-000AD9C; Wed, 19 Jul 95 16:36 PDT
Received: from gopher.legislate.com ([192.77.155.4]) by pixar.com with SMTP id AA14437
(5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 19 Jul 1995 16:34:39 -0700
Received: by gopher.legislate.com
id <m0sYexj-0004hjC@gopher.legislate.com>
(Debian /\oo/\ Smail3.1.29.1 #29.33); Wed, 19 Jul 95 19:39 GMT
Message-Id: <m0sYexj-0004hjC@gopher.legislate.com>
Date: Wed, 19 Jul 95 19:39 GMT
From: rdr@tad.micro.umn.edu (Raul Miller)
To: debian-bugs@pixar.com
Cc: Ted Hajek <tedhajek@boombox.micro.umn.edu>
Subject: /usr/sbin/cgiparse -form doesn't work
Package: cern-httpd
version: 3.0
package_revision: 3
According to the documentation located at
http://www.w3.org/hypertext/WWW/Daemon/User/CGI/cgiparse.html,
cgiparse has semantics which include:
cgiparse -form
Parse QUERY_STRING as form request. Outputs a string which,
when eval'ed by Bourne shell, will set shell variables
beginning with FORM_ appended with field name. Field values are
the contents of the variables.
and
cgiparse -init
If QUERY_STRING is not defined, read stdin and output a string
that when eval'd by Bourne shell it will set QUERY_STRING to
its correct value. This can be used when the same script is
used with both GET and POST method. Typical use in the
beginning of Bourne shell script:
eval `cgiparse -init`
After this command the QUERY_STRING environment variable will
be set regardless of whether GET or POST method was
used. Therefore cgiparse may be called multiple times in the
same script (otherwise with POST it could only be called once
because after that the stdin would be already read, and the
next cgiparse would hang).
However, working with an example value, cgiparse fails:
$ cat /tmp/cgi-init # generated by cgiparse -init
QUERY_STRING='what-to-do=read&who-to-do-it-with=Aleks&what-to-wear=Jeans&what-to-wear=Sweatshirt&what-to-wear=Socks'; export QUERY_STRING
$ eval `cat /tmp/cgi-init`
$ echo $QUERY_STRING
what-to-do=read&who-to-do-it-with=Aleks&what-to-wear=Jeans&what-to-wear=Sweatshirt&what-to-wear=Socks
$ /usr/sbin/cgiparse -form
$ eval `cat /tmp/cgi-init | sed -e s/-/_/g`
$ /usr/sbin/cgiparse -form
FORM_what_to_do='read'; FORM_who_to_do_it_with='Aleks'; FORM_what_to_wear='Jeans, Sweatshirt, Socks'
$ exit
Personally, I don't care cgiparse deals with the hyphens, but they
ought to be dealt with somehow.
--
Raul Miller
Acknowledgement sent to rdr@tad.micro.umn.edu (Raul Miller)
:
New bug report received and forwarded.
Full text available.
Report forwarded to debian-devel@pixar.com
:
Bug#1126
; Package cern-httpd
.
Full text available.
Ian Jackson /
iwj10@thor.cam.ac.uk,
with the debian-bugs tracking mechanism