From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Sun, 19 Apr 2009 13:05:21 -0400 To: 9fans@9fans.net In-Reply-To: <97a49263e0b4c855f2f2a42975a9b8bc@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] web server Topicbox-Message-UUID: e94e2c00-ead4-11e9-9d60-3106f5b1d025 On Sun Apr 19 12:03:54 EDT 2009, 9nut@9netics.com wrote: > you could make local mods to your httpd so that paths starting with > /cgi are given similar treatment as those that start with /magic; it > would execute "cgi" and pass it the arguments as usual. then url is: > > http://myserver/cgi/foo?var1=1&var2=2 > > and in script "foo" the $QUERY_STRING will be "var1=1&var2=2" if you look at /sys/src/cmd/ip/httpd/init.c you'll see that argv[3] is the query string. minooka; g req.search init.c init.c:97: connect.req.search = argv[3]; there has been some recent reorganization of httpd.c that i haven't carefully looked at. about the same time i made a few modifications of my own to eliminate some bad interactions between magic, @ and other redirections. i don't recall the senerio exactly, but depending on the situation, arguments could be parsed or not parsed. if anyone else needs that, i'd be glad to put it on sources. - erik