From: Austin Ziegler Date: 2003-11-04T08:00:56+09:00 Subject: Re: CGI uses file size to distinguish between regular values and files On Tue, 4 Nov 2003 06:51:43 +0900, Simon Kitching wrote: > On Tue, 2003-11-04 at 10:29, Austin Ziegler wrote: >> I didn't miss that. What's wrong, though, is that the CGI library >> is returning different values for parameters based on the total >> size of the data. > Is it really returning "different values for parameters"? As I'm understanding it -- I haven't yet put together tests for this -- there is a difference between the return for a multipart form (e.g., a file upload) which does Tempfile/StringIO and a single part form which does a String. If this is indeed the case, it's problematic, IMO. Ideally, one should not *have* to know that you're dealing with an IO object of any sort. It gets worse: WEBrick deals with such things only as strings (well, FormData). So if I want to make Ruwiki or Bug Traction handle multipart data, I have to deal with three different modes of operation based on (1) whether or not CGI is dealing with a multipart form, (2) a single part form, or (3) WEBrick. IMO, CGI does this wrong. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.11.03 * 17.11.48