]> err.no Git - varnish/log
varnish
17 years agoWhen closing a backend connection, we can run into a ECONNRESET which
phk [Tue, 20 Nov 2007 11:11:17 +0000 (11:11 +0000)]
When closing a backend connection, we can run into a ECONNRESET which
given circumstances is fair game.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2264 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd some asserts to the plumbing around the C-compiler invocation.
phk [Tue, 20 Nov 2007 11:07:47 +0000 (11:07 +0000)]
Add some asserts to the plumbing around the C-compiler invocation.

Collect any messages from the C-compiler and pass them on to the
user, but do not take them as evidence of a failed compilation,
check the returnvalue for that.

To avoid confusion, explicitly say when the VCL program was compiled.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2263 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoChange the assert() that triggers in #167 to spassert().
des [Thu, 15 Nov 2007 16:02:05 +0000 (16:02 +0000)]
Change the assert() that triggers in #167 to spassert().

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2255 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoBigger hammer: panic() is similar to lbv_assert() but takes a struct sess *
des [Thu, 15 Nov 2007 16:01:21 +0000 (16:01 +0000)]
Bigger hammer: panic() is similar to lbv_assert() but takes a struct sess *
from which it tries to extract as much useful information as possible before
it croaks.  The corresponding macro is spassert(), which assumes you have
a struct sess *sp in scope.  This should help a lot with bugs like #167
where important information is not available post-mortem (because sp->obj
points into the cache, which is not included in the core dump)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2254 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a VALID_OBJ() predicate macro.
des [Thu, 15 Nov 2007 15:07:15 +0000 (15:07 +0000)]
Add a VALID_OBJ() predicate macro.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2253 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhitespace cleanup
des [Thu, 15 Nov 2007 14:18:39 +0000 (14:18 +0000)]
Whitespace cleanup

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2252 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoForgot to commit this when vtmpfile.c was added.
des [Fri, 9 Nov 2007 22:59:44 +0000 (22:59 +0000)]
Forgot to commit this when vtmpfile.c was added.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2251 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoClean up the code a bit, and warn the user when changing a parameter that
des [Fri, 9 Nov 2007 14:44:27 +0000 (14:44 +0000)]
Clean up the code a bit, and warn the user when changing a parameter that
requires the child to be restarted or the VCL script to be reloaded.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2250 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSignificant rewrite of the code used to invoke the C compiler. The most
des [Fri, 9 Nov 2007 14:10:15 +0000 (14:10 +0000)]
Significant rewrite of the code used to invoke the C compiler.  The most
important functional change is that the source is no longer piped to the
compiler; instead, the source file name (which now ends in .c) is passed
on the command line.  This makes it *much* easier to support non-GNU
compilers.

The cc_command parameter processed by a custom function instead of sprintf;
"%s" is replaced with the source file name, "%o" is replaced with the output
file name, and "%%" is replaced with a single "%".

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2249 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd our own mkstemp(3) clone which allows the template to contain non-
des [Fri, 9 Nov 2007 14:03:13 +0000 (14:03 +0000)]
Add our own mkstemp(3) clone which allows the template to contain non-
placeholder characters after the placeholders.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2248 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhitespace cleanup.
des [Fri, 9 Nov 2007 12:43:09 +0000 (12:43 +0000)]
Whitespace cleanup.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2247 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhen diagnostics are enabled, log every kevent that has a session associated
des [Fri, 9 Nov 2007 11:19:45 +0000 (11:19 +0000)]
When diagnostics are enabled, log every kevent that has a session associated
with it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2246 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoIgnore config.cache.
des [Thu, 8 Nov 2007 21:33:53 +0000 (21:33 +0000)]
Ignore config.cache.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2243 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoNit
des [Thu, 8 Nov 2007 21:32:42 +0000 (21:32 +0000)]
Nit

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2242 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMinimal intervention fix for #162: we can delay arming a kevent, but we
des [Thu, 8 Nov 2007 20:30:06 +0000 (20:30 +0000)]
Minimal intervention fix for #162: we can delay arming a kevent, but we
can't delay disarming it, or we will have a race between the acceptor and
a worker thread.  This will need revisiting at some later date.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2232 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoPressing 0-9 will change the delay to the corresponding power of two (e.g.
des [Thu, 8 Nov 2007 16:52:40 +0000 (16:52 +0000)]
Pressing 0-9 will change the delay to the corresponding power of two (e.g.
press 3 for 2^3 = 8 seconds)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2231 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoCopy&paste -D (daemonize) from varnishlog.
des [Thu, 8 Nov 2007 16:28:26 +0000 (16:28 +0000)]
Copy&paste -D (daemonize) from varnishlog.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2230 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoPick some nits.
des [Thu, 8 Nov 2007 16:27:53 +0000 (16:27 +0000)]
Pick some nits.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2229 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoTypo in previous commit.
des [Sat, 3 Nov 2007 12:30:06 +0000 (12:30 +0000)]
Typo in previous commit.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2228 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoTest whether SO_{RCV,SND}TIMEO work (they are defined but unimplemented
des [Fri, 2 Nov 2007 14:09:17 +0000 (14:09 +0000)]
Test whether SO_{RCV,SND}TIMEO work (they are defined but unimplemented
on Solaris, so simply checking for their presence is not enough)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2227 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFix the struct statvfs issue.
des [Thu, 1 Nov 2007 21:57:44 +0000 (21:57 +0000)]
Fix the struct statvfs issue.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2226 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoHeader cleanup.
des [Thu, 1 Nov 2007 21:53:59 +0000 (21:53 +0000)]
Header cleanup.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2225 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoDon't rely on non-portable <paths.h>
des [Thu, 1 Nov 2007 21:52:34 +0000 (21:52 +0000)]
Don't rely on non-portable <paths.h>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2224 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd missing <strings.h>
des [Thu, 1 Nov 2007 21:48:54 +0000 (21:48 +0000)]
Add missing <strings.h>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2223 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd Solaris support. Avoid kshisms.
des [Thu, 1 Nov 2007 21:47:58 +0000 (21:47 +0000)]
Add Solaris support.  Avoid kshisms.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2222 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRefine the debugging string: we don't really need the XID, but we do need
des [Tue, 30 Oct 2007 14:40:55 +0000 (14:40 +0000)]
Refine the debugging string: we don't really need the XID, but we do need
the thread ID in order to locate the correct thread in gdb.  Furthermore,
we must use VSL rather than WSL since the session might actually not have
a worker at that point; but if it does, make sure to flush the log first.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2220 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhen DIAGNOSTICS is defined, log every step that each session goes through,
des [Tue, 30 Oct 2007 14:06:37 +0000 (14:06 +0000)]
When DIAGNOSTICS is defined, log every step that each session goes through,
along with some vital statistics, and flush the log regularly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2215 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agor2208 was correct but incomplete. It is possible for a session to reach
des [Tue, 30 Oct 2007 14:02:58 +0000 (14:02 +0000)]
r2208 was correct but incomplete.  It is possible for a session to reach
cnt_done() without a VCL reference, if we never got a request on that
connection.  However, a session that reaches cnt_again() will never have
a VCL reference, so the assertion there is incorrect.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2214 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSimplify WS_DEBUG(), and make it conditional on DIAGNOSTICS.
des [Tue, 30 Oct 2007 13:42:52 +0000 (13:42 +0000)]
Simplify WS_DEBUG(), and make it conditional on DIAGNOSTICS.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2213 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoEnable diagnostics
des [Tue, 30 Oct 2007 13:41:56 +0000 (13:41 +0000)]
Enable diagnostics

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2212 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd an --enable-diagnostics option which causes DIAGNOSTICS to be defined.
des [Tue, 30 Oct 2007 13:39:21 +0000 (13:39 +0000)]
Add an --enable-diagnostics option which causes DIAGNOSTICS to be defined.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2211 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRevert r2208, I believe the assert is correct.
des [Tue, 30 Oct 2007 12:57:03 +0000 (12:57 +0000)]
Revert r2208, I believe the assert is correct.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2210 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoUse pdiff()
des [Tue, 30 Oct 2007 12:54:10 +0000 (12:54 +0000)]
Use pdiff()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2209 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAFAICT, it is perfectly valid for sp->vcl to be NULL here.
des [Tue, 30 Oct 2007 12:38:34 +0000 (12:38 +0000)]
AFAICT, it is perfectly valid for sp->vcl to be NULL here.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2208 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoIncomplete change log for 1.1.2
des [Tue, 30 Oct 2007 12:36:09 +0000 (12:36 +0000)]
Incomplete change log for 1.1.2

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2207 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoComment tweak
des [Tue, 30 Oct 2007 12:35:40 +0000 (12:35 +0000)]
Comment tweak

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2206 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoUse a cast to prevent sign extension instead of masking it off after the fact.
des [Tue, 30 Oct 2007 10:48:30 +0000 (10:48 +0000)]
Use a cast to prevent sign extension instead of masking it off after the fact.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2193 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd more paranoia
phk [Mon, 29 Oct 2007 12:22:38 +0000 (12:22 +0000)]
Add more paranoia

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2190 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoGive struct ws the mini_obj treatment, not sure why I didn't before.
phk [Mon, 29 Oct 2007 12:10:16 +0000 (12:10 +0000)]
Give struct ws the mini_obj treatment, not sure why I didn't before.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2189 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoTypo in previous commit.
phk [Mon, 29 Oct 2007 12:09:54 +0000 (12:09 +0000)]
Typo in previous commit.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2188 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMore checks, trying to find pointer tango
phk [Mon, 29 Oct 2007 12:06:34 +0000 (12:06 +0000)]
More checks, trying to find pointer tango

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2187 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMake bereq. available from vcl_fetch()
phk [Mon, 29 Oct 2007 10:22:22 +0000 (10:22 +0000)]
Make bereq. available from vcl_fetch()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2186 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoImplement relative URL for esi:include. Use the bereq.url as
phk [Mon, 29 Oct 2007 10:20:36 +0000 (10:20 +0000)]
Implement relative URL for esi:include.  Use the bereq.url as
starting point, since req.url may have been rewritten underway.
Store result in objects workspace.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2185 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoPostpone freeing the bereq until after VCL_fetch() has been called
phk [Mon, 29 Oct 2007 10:17:58 +0000 (10:17 +0000)]
Postpone freeing the bereq until after VCL_fetch() has been called

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2184 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoGive workspaces an identifying string to aid debugging.
phk [Mon, 29 Oct 2007 09:28:21 +0000 (09:28 +0000)]
Give workspaces an identifying string to aid debugging.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2183 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd compile-time selectable SHMlogging of WS-activity
phk [Mon, 29 Oct 2007 09:24:16 +0000 (09:24 +0000)]
Add compile-time selectable SHMlogging of WS-activity

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2182 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRemember to reset te bereq's workspace after use.
phk [Mon, 29 Oct 2007 09:16:13 +0000 (09:16 +0000)]
Remember to reset te bereq's workspace after use.

NB: This should be merged back to 1.1

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2181 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMask negative characters to 8 bit before formatting.
phk [Mon, 29 Oct 2007 08:24:04 +0000 (08:24 +0000)]
Mask negative characters to 8 bit before formatting.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2180 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoIf we find no ESI elements of an object, don't penalize it with ESI's
phk [Mon, 29 Oct 2007 08:16:22 +0000 (08:16 +0000)]
If we find no ESI elements of an object, don't penalize it with ESI's
chunked delivery.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2179 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoDon't complain about unrecognized <! sequences, just treat them like
phk [Mon, 29 Oct 2007 08:09:28 +0000 (08:09 +0000)]
Don't complain about unrecognized <! sequences, just treat them like
any other <...>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2178 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoIssue an VCL_error if 'esi' is not used from vcl_fetch.
phk [Mon, 29 Oct 2007 07:53:27 +0000 (07:53 +0000)]
Issue an VCL_error if 'esi' is not used from vcl_fetch.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2177 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoGive VRT code a chance to see which method we are in.
phk [Mon, 29 Oct 2007 07:53:01 +0000 (07:53 +0000)]
Give VRT code a chance to see which method we are in.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2176 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a VCL_error shmtag
phk [Mon, 29 Oct 2007 07:46:12 +0000 (07:46 +0000)]
Add a VCL_error shmtag

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2175 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFix file list.
des [Sun, 28 Oct 2007 18:43:24 +0000 (18:43 +0000)]
Fix file list.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2173 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoDon't mess up the chunked encoding for nested esi:include
phk [Fri, 26 Oct 2007 11:13:32 +0000 (11:13 +0000)]
Don't mess up the chunked encoding for nested esi:include

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2172 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMore ESI work, now full URL srcs (http://...) work in addition to
phk [Fri, 26 Oct 2007 11:00:25 +0000 (11:00 +0000)]
More ESI work, now full URL srcs (http://...) work in addition to
absolute src ("/...").  Relative src's coming up next, once I find
out where to store the edited string.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2171 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoPush hole through the esi:include path, making a very trivial example
phk [Wed, 24 Oct 2007 20:34:24 +0000 (20:34 +0000)]
Push hole through the esi:include path, making a very trivial example
work fully, leaving a trail of XXX and other devastation:

Add an esi nesting counter to the session.

Teach RES_WriteObj() to send an object as a chunk in chunked encoding.

Bail cnt_done() early for nested ESI transactions.

Catch the src="" attribute in esi:include and store it in the esibit.

In ESI_Deliver(), recurse into CNT_Session(STP_RECV) in order to handle
the include element of an esibit.

Recursion is probably not the ideal solution here, but it might quite
conceiveably be the best one, since it is quite cheap and very trivial.

Outstanding issues: too many to list still.

The following example worked for me:

<html>
<body>
<pre>
<esi:include src="/esi.txt"/>
</pre>
</body>
</html>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2170 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd attribute parsing
phk [Wed, 24 Oct 2007 19:38:43 +0000 (19:38 +0000)]
Add attribute parsing

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2169 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSplit STP_RECV in two:
phk [Wed, 24 Oct 2007 18:38:17 +0000 (18:38 +0000)]
Split STP_RECV in two:

STP_START is the initial setup of a viable workerthread:  Dissecting
HTTP, getting vcl reference etc.

STP_RECV is invoking vcl_recv() and following orders.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2168 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoGently shuffle closer to being able to restart a esi:include on the next
phk [Wed, 24 Oct 2007 14:32:12 +0000 (14:32 +0000)]
Gently shuffle closer to being able to restart a esi:include on the next
element:

Add two checkpoints for the sessions workspace.

The first checkpoint is after the session fixed data, and move the
client address and port to workspace to see that this works.

The second checkpoint is after the, as received unadultered by VCL
http request.  Grab a copy of the http request matching this.

Implement rollback as an optional feature of restart in VCL.

Move various workspace initialization and resetting operations to more
suitable locations in the program flow.

I don't know if this is really usable, but now it's possible to do:

backend b1 {
set backend.host = "backend1";
set backend.port = "80";
}

backend b2 {
set backend.host = "backend2";
set backend.port = "80";
}

sub vcl_recv {
set req.backend = b1;
remove req.http.cookie;

if (req.restarts == 0) {
set req.url = "foobar.html";
} else {
set req.backend = b2;
}
}

sub vcl_fetch {
if (obj.status != 200) {
restart rollback;
}
}

And have it first look for "foobar.html" on one backend, and failing
that, try to give the user what they asked for from the other backend.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2167 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a WS_Dup() function
phk [Wed, 24 Oct 2007 10:24:08 +0000 (10:24 +0000)]
Add a WS_Dup() function

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2166 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoCheck for a negative return from HTC_Rx(). Probably needs revisiting.
des [Tue, 23 Oct 2007 12:36:34 +0000 (12:36 +0000)]
Check for a negative return from HTC_Rx().  Probably needs revisiting.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2162 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSupply reasonable defaults for error code / reason.
des [Tue, 23 Oct 2007 12:35:29 +0000 (12:35 +0000)]
Supply reasonable defaults for error code / reason.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2161 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a test case for the root cause of #164, which is that the backend sends
des [Tue, 23 Oct 2007 11:57:16 +0000 (11:57 +0000)]
Add a test case for the root cause of #164, which is that the backend sends
a garbled response (or no response at all).

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2160 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a test case for the root cause of #164, which is that the backend sends
des [Tue, 23 Oct 2007 11:56:56 +0000 (11:56 +0000)]
Add a test case for the root cause of #164, which is that the backend sends
a garbled response (or no response at all).

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2159 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoQuench a pointless sigchild warning
phk [Tue, 23 Oct 2007 09:23:04 +0000 (09:23 +0000)]
Quench a pointless sigchild warning

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2157 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoEvaluate ${localstatedir} later.
des [Mon, 22 Oct 2007 14:37:19 +0000 (14:37 +0000)]
Evaluate ${localstatedir} later.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2154 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoDon't assert that close() returns 0, it won't when the remote end closes
des [Fri, 19 Oct 2007 13:58:12 +0000 (13:58 +0000)]
Don't assert that close() returns 0, it won't when the remote end closes
the connection first.  This fixes #168.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2153 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoDon't try to interpret the status code when we know the response is invalid.
des [Fri, 19 Oct 2007 13:49:27 +0000 (13:49 +0000)]
Don't try to interpret the status code when we know the response is invalid.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2151 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRe-add Solaris support which was removed in r1465.
des [Fri, 19 Oct 2007 11:18:49 +0000 (11:18 +0000)]
Re-add Solaris support which was removed in r1465.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2133 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd error message.
des [Fri, 19 Oct 2007 09:48:35 +0000 (09:48 +0000)]
Add error message.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2131 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoUse an 8 kB stack buffer instead of a heap buffer.
des [Fri, 19 Oct 2007 09:47:53 +0000 (09:47 +0000)]
Use an 8 kB stack buffer instead of a heap buffer.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2130 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhen testing pipelined POST requests, send enough data to actually exercise
des [Fri, 19 Oct 2007 09:46:58 +0000 (09:46 +0000)]
When testing pipelined POST requests, send enough data to actually exercise
request copying loop.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2129 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoThe framework bugs which used to affect this test case have long since
des [Fri, 19 Oct 2007 09:35:09 +0000 (09:35 +0000)]
The framework bugs which used to affect this test case have long since
been fixed, so remove the workarounds.  Also stop testing things which
are not intended to work.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2128 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAlso test pipelining of POST requests (in pass mode)
des [Fri, 19 Oct 2007 09:09:42 +0000 (09:09 +0000)]
Also test pipelining of POST requests (in pass mode)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2127 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMove malloc() / free() out of the loop, and plug a leak. Ideally, we
des [Fri, 19 Oct 2007 09:09:17 +0000 (09:09 +0000)]
Move malloc() / free() out of the loop, and plug a leak.  Ideally, we
shouldn't need to malloc() / free() at all, but I don't have time to
figure out how to avoid it right now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2126 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSimplify
des [Fri, 19 Oct 2007 09:05:10 +0000 (09:05 +0000)]
Simplify

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2125 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoStyle & whitespace
des [Fri, 19 Oct 2007 08:55:46 +0000 (08:55 +0000)]
Style & whitespace

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2124 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoImproved handling of pass for POST requests.
cecilihf [Fri, 19 Oct 2007 08:51:40 +0000 (08:51 +0000)]
Improved handling of pass for POST requests.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2123 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFix pipelining: don't expect the fd to become readable before we
phk [Fri, 19 Oct 2007 08:50:50 +0000 (08:50 +0000)]
Fix pipelining: don't expect the fd to become readable before we
look for complete requests.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2122 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMake ESI processing actually work.
phk [Thu, 18 Oct 2007 19:09:33 +0000 (19:09 +0000)]
Make ESI processing actually work.

So far we support only the <esi:remove> element.

All other <esi:...> elements are ignored.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2121 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a regression test for pipelining, which is currently broken in trunk.
des [Thu, 18 Oct 2007 16:07:19 +0000 (16:07 +0000)]
Add a regression test for pipelining, which is currently broken in trunk.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2120 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd a missing wait().
des [Thu, 18 Oct 2007 15:48:11 +0000 (15:48 +0000)]
Add a missing wait().

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2119 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSeparate the act of sending a request from that of receiving a response.
des [Thu, 18 Oct 2007 15:45:34 +0000 (15:45 +0000)]
Separate the act of sending a request from that of receiving a response.
This (along with earlier changes to the client code) allows us to send
multiple requests, then receive the responses in order.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2118 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMake VARNISH_STATE_DIR work correctly when using the default prefix.
des [Thu, 18 Oct 2007 15:18:42 +0000 (15:18 +0000)]
Make VARNISH_STATE_DIR work correctly when using the default prefix.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2116 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoMake pass mode work for POST requests. Solves ticket #47.
cecilihf [Thu, 18 Oct 2007 13:38:45 +0000 (13:38 +0000)]
Make pass mode work for POST requests. Solves ticket #47.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2115 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRevert previous change and fix the comment that explains why it has to be
des [Thu, 18 Oct 2007 13:30:52 +0000 (13:30 +0000)]
Revert previous change and fix the comment that explains why it has to be
the way it is.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2114 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoRun the passPOST test first.
cecilihf [Thu, 18 Oct 2007 13:24:35 +0000 (13:24 +0000)]
Run the passPOST test first.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2113 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoI like code that compiles
des [Thu, 18 Oct 2007 11:10:25 +0000 (11:10 +0000)]
I like code that compiles

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2111 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoAdd error messages from the XML/ESI parser
phk [Wed, 17 Oct 2007 08:32:19 +0000 (08:32 +0000)]
Add error messages from the XML/ESI parser

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2110 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFix parsing of "esi" command.
phk [Tue, 16 Oct 2007 22:35:35 +0000 (22:35 +0000)]
Fix parsing of "esi" command.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2109 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoStart pulling ESI:include stuff over from my private tree.
phk [Tue, 16 Oct 2007 22:23:45 +0000 (22:23 +0000)]
Start pulling ESI:include stuff over from my private tree.

This is the meat of the XML-dissecting code.

In theory the task is pretty simple, but it gets complicated by the fact
that the XML input can be split over multiple pieces of storage, with
an element we care about straddling a boundary.

I have not decided what to do about ESI violations or XML syntax errors,
SHMlogging them, possibly controlled by a parameter might make sense.
For now mark them in the source.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2108 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoWhitespace cleanup.
des [Tue, 16 Oct 2007 14:15:54 +0000 (14:15 +0000)]
Whitespace cleanup.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2107 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoPull in FreeBSD's daemon(3) for platforms that lack it.
des [Tue, 16 Oct 2007 14:12:23 +0000 (14:12 +0000)]
Pull in FreeBSD's daemon(3) for platforms that lack it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2106 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoUse %zd for size_t.
des [Tue, 16 Oct 2007 13:10:43 +0000 (13:10 +0000)]
Use %zd for size_t.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2105 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoSilence flexelint
phk [Tue, 16 Oct 2007 10:17:24 +0000 (10:17 +0000)]
Silence flexelint

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2104 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFlexelint polishing.
phk [Tue, 16 Oct 2007 09:11:45 +0000 (09:11 +0000)]
Flexelint polishing.
Always enforce the 2GB filesize limit on 32bit architectures.
Clean up a couple of messages

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2101 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoReduce number of TIM_real() calls slightly in multi socket case.
phk [Tue, 16 Oct 2007 09:03:18 +0000 (09:03 +0000)]
Reduce number of TIM_real() calls slightly in multi socket case.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2100 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFlexelint polish
phk [Tue, 16 Oct 2007 09:00:48 +0000 (09:00 +0000)]
Flexelint polish

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2099 d4fa192b-c00b-0410-8231-f00ffab90ce4

17 years agoFlexelint polish
phk [Tue, 16 Oct 2007 09:00:22 +0000 (09:00 +0000)]
Flexelint polish

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2098 d4fa192b-c00b-0410-8231-f00ffab90ce4