|
Posted by Chung Leong on 10/23/12 11:56
Andy Hassall wrote:
> Ah! Interesting - thanks.
>
> So PHP could - in theory - send the response back as a 417 and populate
> $_FILES with a suitable error.
In theory. I have never seen IE sending an expect 100-continue header.
Maybe Firefox does. I doubt it though. In a way it is a limitation of
the specs, as I don't need a pragmatic way by which this feature could
be implemented. Since existing servers do not send the 100 Continue
message, the browser has to rely on some kind of a timeout. That would,
of course, slow things down significantly. What is needed is a header
for server to communicate to the client that it's capable of emitting a
100-continue. Then again, come to think of it, the whole thing is
really useless, since there's no information in the request headers
that tells you the file size or other criteria by which you might
reject the request body.
It's easier to handle this on the client side. The input=file element
should expose the size of the file selected. An element for uploading
multiple files would be nice too. That and a onSubmitProgress event for
monitoring the upload progress... The lack of innovation really sucks.
Navigation:
[Reply to this message]
|