Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   Request: limit size of attachments, posted by Bartjan Wattel on Wed Jul 14 13:58:26 2004 
    icon2.gif   Re: Request: limit size of attachments, posted by Stefan Ritt on Thu Jul 15 22:01:55 2004 
Message ID: 609     Entry time: Thu Jul 15 22:01:55 2004     In reply to: 596
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Request  OS: Linux | Windows  ELOG Version: 2.5.3. 
Subject: Re: Request: limit size of attachments 
> Is it possible to add a flag in the configuration file, to specify the 
> maximum size of an attachment?

I implemented a "max content length = xxx" flag, which defaults to 10MB. If an
attachment is larger, an error gets displayed. The problem is that elogd can
only send the error message to the browser *after* it received the whole
request, so it has to "drain" the 240 MB first, which could take quite some
time on a slow connection.

Alternatively, I can cut the connection to the browser immediately, since the
HTTP header contains the content length after the first ~500 bytes, but in
that case the browser only shows a message box "Document contains no data"
which gives the user noe clue of what's wrong.

Anyhow the biggest problem of elog in high stress environments is that it's
single threaded. So if someone issues a search in a large logbook, it could
take some time, in which elog cannot respond to other requests. Maybe I will
find time in the future to make elog multithreaded, but certainly not in the
near future.
ELOG V3.1.5-fe60aaf