[Web-SIG] Random thoughts

David Fraser davidf at sjsoft.com
Tue Nov 4 07:14:23 EST 2003


Ian Bicking wrote:

> On Nov 3, 2003, at 2:29 PM, Gregory (Grisha) Trubetskoy wrote:
>
>> In case of POST, availability of form data implies that something 
>> consumes
>> (reads) the request. Some people would prefer to read it themselves. A
>> (first) call to form() would trigger this action, after which there
>> wouldn't be anything to read. Otherwise you could read it with
>> request.read().
>
>
> I forget how exactly cgi works right now, Webware has tried to get 
> this right but I'm not sure if it has.  I think it consumes the 
> request body if it's valid data that can be parsed (maybe even in 
> spite of the content-type of the request), but otherwise leaves it 
> intact and sets no fields.
>
> If it is valid data that can be parsed into fields, maybe it's not so 
> bad if the body is lost, because all the information remains.  If you 
> have an option to keep the data, I'd just include it in the 
> constructor -- parsing it lazily (and thus throwing away the body 
> lazily) seems error-prone.  If it can't be parsed into fields, then 
> certainly it should be available in some other form.

However, we should deal with uploaded files differently here - they 
could be huge! You dno't want them read in automatically.

David




More information about the Web-SIG mailing list