rewrote shutdown code. Using FD timeouts suck{s,ed}. Now we use event
handlers and close any open sockets (or call timeout handlers) when
the shutdown event runs.
No runtime warning about invalid size on replies without content length.
Removed some compiletime warnings.
Changed the trace format to store checksum in hex.
New refresh algorithm. No longer set entry->lastmod == entry->timestamp
when the Last-Modified header is absent. Also, don't do ISM validations
without a Last-Modified timestamp.
From: Henrik Nordstrom <hno@hem.passagen.se>
Changed mime.conf (and related C code) to include additional options to
make it possible for the user to override mime.conf settings. Primary
use is to view a text file that mime.conf says is binary, but it also
allows the user do download a binary file that otherwise gets downloaded
as ascii (and displayed in the browser).
+download show a binary download icon in FTP listings
+view show a ascii download icon in FTP listings
+download should be set on every mimetype that may be binary files at
some locations. +view should be set when it is known that some files may
be ascii to make it easier for the users to view these files (like the
default mime type).
Had to rewrite most of the ftp listing formatting code, but now should
it be much easier to maintain.
From: Henrik Nordstrom <hno@hem.passagen.se>
Here is a small mime type patch. to properly handle the .tgz
extension as gzip application/x-tar. It's done by allowing content type
to be blank "-" if it has no meaning, as in encodings.
pretty major rewrite. Previously we wouldn't read from a socket
again until the previously read chunk had been fully written to
the other side. Now we read ahead on both sides, moving unwritten
chunks to the beginning of the copy buffers.
This also has consequences for the closing sequence. When either side
closes, we are supposed to write any pending data to the other side
and then close the other side as well. The code is now more symmetric,
but has to include all these ugly checks for valid filedescriptors.
cachability for responses from authenticated requests should depend
upon the presence of Cache-Control: Public, and not Cache-Control:
Proxy-Revalidate.
* Do not warn about size mismatch on responses without a Content-Length:
header
* Documented all the options in usage().
* Added -t to build a tracefile suitable for later input
A tracefile has the format
METHOD URL BODY-FILE SIZE CHECKSUM
Where:
METHOD Is the HTTP method to use, usually GET
URL The URL
BODY-FILE Is a file to send as request body (- for none)
SIZE The object size of the returned object (- to ignore)
CHECKSUM A simple checksum of the object (- to ignore)
tcp-banger already accepts this format as input (was in one of my
previous tcp-banger patches).
call urlCanonical() in refreshCheck() if entry->mem_obj == NULL.
Changed urlCanonical() interface and operation. Writes the URL
into a xmalloc'd buffer (request_t->canonical). Eliminated 'buf'
arg to urlCanonical(). client_side.c was the only place which used it,
so now we must xstrdup() there.