lua-users home
lua-l archive

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

On Fri, Jan 24, 2003 at 02:15:53PM +0800, Peter Hill wrote:
> Joe Stewart:
> > Do you know how dynamic content is handled via http? Is there something
> > more than GET/POST/PUT that I need to know about (too impatient to read
> > RFCs)? Any pointers?
> I've done a little personal research (but are by no means an expert) so if
> you have a query I'll tell you what little I know.
> Static content content should also respond to the HEAD request (so that the
> whole page need not be reloaded if no changes have occured), and should
> ideally return a Content-Length so the browser can provide an estimate of
> download time. It should also return a Date so that the page may be
> effectively cached.
> Dynamic content should do the same _if possible_ (obviously very dynamic
> data must change its date each time). It may also wish to return a No-Cache
> command if the data always changes each access and becomes out of date
> quickly, or if the data is sensitive and should not be cached.

IIRC, all content should be able to reply to a HEAD request.  Also, I
seem to remember that if you want to have virtual servers (and therefor
HTTP/1.1) you've also *MUST* support chunked encoding, according to the
RFC (although I may be wrong, it's been a while) which complicates
matters a little.  But I doubt most people wanting to write a webserver
in Lua would want virtual servers.  In fact, I would have thought most
servers would only need to be so simple as to only implement HTTP/0/9,
where the only method that exists is GET.

Rob Kendrick                             
PGP signed or encrypted mail welcome                         Key ID: 3651D17A