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.
We had a sort of a race condition problem. For object data in memory
we were freeing up to the QUEUED offset instead of the DONE offset.
This resulted in a chunk of the object which was not in memory and
not yet written to disk.
fix up some confusion/bugs with http->out.offset in clientSendMoreData().
Now that wierd hacks for HEAD requests are gone, we have to change
where we increment the offset. Now its incremented in two places,
for the headers and for the body.
From: Henrik Nordstrom <hno@hem.passagen.se>
Here is a patch that fixes FTP directory listings on some FTP servers /
directories.
* Always include .. first in directory listings, regardless if the
origin server lists one or not. This fixes both servers that don't list
.., and directories that have strange files/directories that get listed
before .. (UNIX example: ".-test")
* Show a "empty" listing when the origin server returns a empty listing.
This is much more intiutive than returning a 0-bytes object (which gives
a "document contains no data" error box in most browsers). This is for
example seen on protected directories where the user is not allowed to
list the files (like bin and etc in most anon-ftp setups).
StoreEntry->refresh was a bad idea. It would require changing
swap.state format and would change the format depending on if
USE_CACHE_DIGESTS were defined.
Now we use default refresh_pattern entries if the StoreEntry doesn't
have a MemObject (and therefore a URL).
Changed handling of cache hits. Swap in FIRST, then check IMS, refresh
and other client-side processing. This gives us mem_obj->url when
we call refreshCheck()
line-at-a-time processing fixes. Bugs caused by ftp://ftp.proftpd.org/
ftpParseListing() didn't properly retain ->data.offset between
calls.
proftpd was sending two control replies together, e.g.
150 opening connection
226 transfer done
ftpParseControlReply() was returning '226' only. Now the control stream
is "buffered" and ftpParseControlReply() has been split into a reading
part and a processing part.
wessels [Tue, 30 Jun 1998 05:29:16 +0000 (05:29 +0000)]
lock store entry during peer selection phase, esp important for ICP
because of delays.
check the cbdata status of the peer select callback in peerSelectTimeout()
wessels [Tue, 30 Jun 1998 03:03:01 +0000 (03:03 +0000)]
a little rearrangement. For CACHEOBJ and INTERNAL requests we don't
need (want) to create fwdState because it won't be attached to
a server-side FD and won't be deallocated.
wessels [Mon, 29 Jun 1998 21:22:50 +0000 (21:22 +0000)]
Move pumpRestart check from http.c to forward.c
Removed unused httpRestart() and httpTryRestart()
removed storeUnregister/storeClientListAdd calls for pump requests because
we need the pump code to stay attached to the client in case we need to
re-forward the request.
wessels [Fri, 26 Jun 1998 10:23:33 +0000 (10:23 +0000)]
adjust sensitivity of peer RTT calculations. Changed the average factor
from 1000 to 50. Added a call to gettimeofday() in comm_incoming().
Surely someone will protest that.