You are here: Re: Checking File Size Before Upload « PHP Programming Language « IT news, forums, messages
Re: Checking File Size Before Upload

Posted by Chung Leong on 08/23/06 03:38

Andy Hassall wrote:
> However, there's no way for PHP to send a response to the browser yet, because
> the content of the file is part of the HTTP request. Its choices are to either
> unceremoniously dump the connection without a response (which it doesn't do,
> for obvious reasons, although the HTTP protocol does allow this), or wait until
> the request has finished so it can send a response back with an error message.
>
> AFAIK this is a limitation of the HTTP protocol and so cannot be worked
> around.

I don't think the HTTP protocol specs mandates that a response can only
be sent after the request body has been fully received. In theory, the
server can send status code 100 to accept the request or a 4xx error
code to reject it. That's not how it's implemented in the browsers
though, AFAIK.

The browser should pass the size of the request to onSubmit if you ask
me. Sometimes I wish HTML hadn't just stopped progressing completely...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация