Re: Threading problem in TIdCustomHTTPServer (TIdMimeTable)

Giganews Newsgroups
Subject: Re: Threading problem in TIdCustomHTTPServer (TIdMimeTable)
Posted by:  Remy Lebeau \(Indy Team\) (re…@lebeausoftware.org)
Date: Mon, 28 Jun 2010

"jgv" <jacques.garciavazqu…@telenet.be> wrote in message
news:AD0873C254B4E340jacques.garciavazqu…@telenet.be...

> There is a threading problem in the http server when serving
> files dues to the mime table (which is not thread safe). I think
> it was there from the beginning but since the mime table grow
> in some previous release it is more evident now.

We are already aware that there is a threading issue with TIdMimeTable.  It
has not been addressed yet.

> I suggest to load the cache when the map table is created:

That would not completely eliminate the problem.  Any time an unknown file
extension is requested, the cache is re-built, so you still have the
potential for threading conflicts.  The correct solution is for
TIdHTTPServer to implement a thread-safe Mime table instead.

--
Remy Lebeau (TeamB)

Replies

In response to

Threading problem in TIdCustomHTTPServer (TIdMimeTable) posted by jgv on Fri, 25 Jun 2010