[plt-scheme] getting raw port of HTTP POST data in PLT Web Server in PLT 4.2.5?

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Thu Mar 11 10:54:45 EST 2010

OK, thanks, Jay.

I think I will probably have to explore the 2nd and/or 3rd options you 
mention, since this system can have multiple people HTTP-uploading huge 
files at the same time that other people's requests are running 
statistical models, etc.

I'm not sure we want to spec RAM requirements high enough to buffer 
uploads in their entirety, and I suspect that hitting swap will kill our 
performance.  Even if we had enough RAM, I'd have to look into GC 
implications of having a few 1GB file uploads buffered in RAM at once.

Jay McCarthy wrote at 03/11/2010 12:20 AM:
> With the standard requests, you can get the POST bytes with
> request-post-data/raw. This means that the entire port has been read
> and is in memory before you get a hold of it. You cannot get the port.
> You could write a dispatcher that uses the connection object directly.
> And you could make your own dispatching server with a different
> read-request function, but that's more complicated.
> Jay
> On Wed, Mar 10, 2010 at 9:01 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:
>> In 4.2.5, from a servlet, will I be able to get a raw port of the HTTP POST
>> data, such that I can do my own MIME multipart decoding and streaming to
>> disk?
>> I would really-really like to have this.
>> (I think I saw something on the email list recently that hinted I might be
>> able to do this, but I can't find it at the moment.)
>> Thanks.

Posted on the users mailing list.