lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Fri, Feb 25, 2011 at 11:13 AM, Jeff Pohlmeyer <yetanothergeek@gmail.com> wrote:
On Fri, Feb 25, 2011 at 3:57 AM, Sebastien Lai wrote:

> it is still lacking one important feature: File uploads.
> The reason I haven't added it yet is simply because I have no idea where to
> start with it, or how File uploads are supposed to be implemented...
> maybe someone can shed some light on this issue?


I guess you could start here:

 http://www.ietf.org/rfc/rfc1867.txt
 http://www.ietf.org/rfc/rfc2388.txt



Thanks, but after observing the output og multipart/formdata, I realized that parsing it *will* be a serious PITA.

<rant>
I don't know who ever thought that delimiting critical data with a list of hyphens is a good idea,  but whoever it was, needs to be shot in the effing face.
</rant>

I suppose that file upload support will not be available for a very long time until I have figured out a sane way to

    1. Parse the raw multipart/formdata properly
    2. actually extract non-formdata (which, just so it happens, is delivered *exactly* the same way as files are delivered...)
    3. ^^^^^^^^^^^^^ do all that without boilingplate code or risking crossplatform availability

Currently, that seems like a fairly impossible target, considering that Perl for example, makes heavy use of its regular _expression_ engine to parse the data properly.