[plt-scheme] CGI file upload

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu Aug 6 14:49:11 EDT 2009

Good point. Obviously I have not done this, but I'm sure everything is
in that file to make it work once you get the CGI information. I'm
happy to take patches to that file that make the job easier.


On Thu, Aug 6, 2009 at 12:08 PM, Thomas Chust<chust at web.de> wrote:
> 2009/8/6 Jay McCarthy <jay.mccarthy at gmail.com>:
>> [...]
>> * Create a connection with
>> http://svn.plt-scheme.org/plt/trunk/collects/web-server/private/connection-manager.ss
>> where the i-port is (current-input-port)
>> * Call read-request from
>> http://svn.plt-scheme.org/plt/trunk/collects/web-server/http/request.ss
>> with the connection
>> * Now you have a web-server style http request.
>> [...]
> Hello,
> I would never expect that approach to work, and a quick glance at the
> code seems to confirm my doubts: A CGI program gets all the HTTP
> header information passed via environment variables and can only read
> the request *body* from standard input.
> The read-request procedure expects to read the headers before the
> body, though, so that code would have to be replaced by a problem
> specific version that reconstructs the HTTP headers from the
> environment.
> cu,
> Thomas
> --
> When C++ is your hammer, every problem looks like your thumb.

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.