made main.c more modular
Added clean shutdown to comm_select. on SIGTERM close incoming sockets
and dnsserver pipes. When no sockets left to select on, return with
COMM_SHUTDOWN.
This patch to alpha9 allows for large requests by the
clients (for example POST file upload)
It adds the configuration directive request_size, which sets the
maximum request size.
The memory used for the request is grown in ASCII_REQUEST_BLOCKSIZE
steps (8Kb).
This patch is not very tested, but it should work... please test.
There is also a small change in cache_cf.c, to remove a compiler warning
when the in_addr localhost variable is initialized. (uninitialized members
in a initialized structure is set to binary 0 by standard)
Added storeEntryValidLength() based on Henrik's version.
If content-length and hdr_size are given, the object is
ejected if the sizes don't match the actual object size.
Made {ftp,gopher,wais} more like http. ie, protoCloseAndFree().
treat ECONNRESET like any other read error. All read errors should
be ejected immediately. Added ERR_ZERO_SIZE_OBJECT.
Significant change to storage manager. Now we don't add the object
to the hash table when it is created. Instead it must be explicitly
added if the object is public. storeAdd() has been split into
two functions: storeCreateEntry() and storeAddEntry(). The first is
called where storeAdd() was called. The second is called when the
object is known to be publicly sharable. For HTTP this means
after the reply header is parsed. For other objects it storeAddEntry()
gets called immediately, as there is no header parsing.
make a large local array static
call storeCreateHashTable in storeInit instead of various other places
always expect 5 args in the swap logfile
use new getCurrentTime()
fix some deubg messages
1. Added storeExpire(StoreEntry *) that marks a object as expired
i.e. it will NOT be provided to new clients
2. don't cache objects with private keys. This is actually a workaround
a small problem: If the server closes the connection before the MIME
headers are send, the object is cached with a private key. This solves
that problem, and adds some error toleranse in the code.
Probably it should be extended to not cache expired objects as well.
3. Expire objects that have a pending delete
This is to prevent new clients from using a object that should be
deleted as soon as possible.
4. Minor changes in debug messages (name corrections and level adjustment)
/Henrik
1. data->reply_hdr are the full unmodified MIME headers, including
terminating "\r\n\r\n"
2. Some debugging at level 0 is changed to level 1.
(keep debug level 0 clean from informal messages please)
3. The MIME parsing is made more tolerant, as specified in
the HTTP 1.0 spec. (only look for \n)
4. Expiry information are set when the headers are received
(before the object goes public). This is to enable the use
of TTL 0 to indicate that the object is private (either
throught Expires: header, or ttl_pattern)
5. If the server connection is closed by RESET, throw the object
away. RESET should only be generated by malfunctioning servers
or when the server dies. It is very unpolite to cache modified
objects. (I am not sure I got this right, pleas check it out)
/Henrik
wessels [Sat, 30 Mar 1996 07:09:02 +0000 (07:09 +0000)]
Major rewrite of logging. Now log accesses when the client data
structure (icpStateData) gets destroyed. TCP_DONE is gone and
TCP_MISS is now logged when the request completes and has a valid
size. Made some adjustments to get error logging working also.
Had to add 'abort_code' element to the StoreEntry Mem_Obj structure.
wessels [Sat, 30 Mar 1996 04:17:23 +0000 (04:17 +0000)]
assign store.c to debugging section 20
fixed storeRebuildFromDisk bug introduced when switched from fdopen(, "a")
to fdopen(, "w"). Now storeInit() makes a little more sense.