> I think the problem here is that, by the time CF could read the
> Content-Length HTTP request header, it's too late - the browser
> has sent the
> file within the HTTP request body, and the web server has already received
> it.
>
> Before the CF engine receives an HTTP request to process, that request has
> already been received in its entirety by the web server. The web server
> deals with issues like malformed requests, so it stands to reason that the
> file has to be written in full to the web server before CF gets to look at
> it.

I was working on a solution to that issue for some folks last night/today
(among other things, meant to get to it last weekend). Basically I've built
an NT service that acts like a http server as far as http posts go. You can
specify a byte cutoff limit for file uploads. When that's exceeded it simply
breaks tcp connection after sending some http headers explaining what just
happened.

A bit rude but... :)

It operates on a seperate port. When done it does a 304 location to the
standard port of the url you just used. Ie, you post to
http://www.allaire.com:90/test/mypost.cfm and you end up at
http://www.allaire.com/test/mypost.cfm. There's a seperate cfx tag to
retrieve the posted data as raw, fields and/or files. (It files the posts by
cftoken/cfid, etc to keep it all seperate.)

That's about the only bloody way to overcome this issue that I know of.

(If I have the time I may eventually add a version of this to ihtk. As well
as some other fun stuff that's collecting dust.)

--min



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to