]>
err.no Git - varnish/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
des [Wed, 10 Oct 2007 13:23:15 +0000 (13:23 +0000)]
Fix braino in Solaris compat bit.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2097
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 9 Oct 2007 07:22:46 +0000 (07:22 +0000)]
Keep track of the highest fd so we don't give poll(2) more pfd's to
chew than necessary.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2096
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 19:15:41 +0000 (19:15 +0000)]
Try to optimize the poll acceptor by moving active entries to the
front of the linked list where they will be found faster later on.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2095
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 16:40:28 +0000 (16:40 +0000)]
Give the 503 returns a protocol and a response as well.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2094
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 15:34:32 +0000 (15:34 +0000)]
Don't use vca_return_session() when we can SES_Delete()
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2093
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 14:12:06 +0000 (14:12 +0000)]
More asserts
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2092
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 13:20:57 +0000 (13:20 +0000)]
EOF transfers are not limited to pre HTTP/1.1 backends, no idea why
I thought so previously.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2091
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 11:32:30 +0000 (11:32 +0000)]
We may in fact not have any headers.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2090
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 11:28:39 +0000 (11:28 +0000)]
Only attempt to decode status integer if we have a good separation.
Possibly ticket #164
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2089
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 11:28:11 +0000 (11:28 +0000)]
Add an assert for spotting ticket #162
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2088
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 10:33:46 +0000 (10:33 +0000)]
Catch EOF on reads instead of looping.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2087
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 10:25:47 +0000 (10:25 +0000)]
Drop the asserts around shutdown(2), there are a number of
legitimate error conditions.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2086
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 09:34:36 +0000 (09:34 +0000)]
upd
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2085
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 08:14:09 +0000 (08:14 +0000)]
More acceptor work:
Make HTC_Rx() return a distinct value for overflow/blast.
Teach vca_handover() to handle HTC_Rx() return status
Use HTC_Rx/vca_handover this way in all three acceptors.
Eliminate vca_pollsession()
Teach CNT_First() about HTC_Rx states.
Log which acceptor we use in shmlog
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2084
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 07:51:31 +0000 (07:51 +0000)]
Bail normally instead of asserting on buffer full.
Drop leading whitespace if so informed.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2083
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 07:50:31 +0000 (07:50 +0000)]
Use HTC_Rx() directly instead of vca_pollsession() wrapper
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2082
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 07:49:26 +0000 (07:49 +0000)]
comments/style
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2081
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 07:19:52 +0000 (07:19 +0000)]
Try to make the pipe code even more robust
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2080
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 8 Oct 2007 07:18:48 +0000 (07:18 +0000)]
Flush the threads shmlog before we try to make up a reponse, so that
we know what transactions trigger problems in that code.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2079
d4fa192b -c00b-0410-8231-
f00ffab90ce4
ssm [Fri, 5 Oct 2007 09:15:09 +0000 (09:15 +0000)]
Fix ticket #166, debian package issues
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2078
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 12:44:19 +0000 (12:44 +0000)]
Go over pipe's polling code and try to do it right in one go by
actually paying attention to what goes on.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2077
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 12:27:49 +0000 (12:27 +0000)]
Oops, last commit included some debugging
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2076
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 12:25:37 +0000 (12:25 +0000)]
Remember to move numeric status when we filter one http to another.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2075
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 09:04:15 +0000 (09:04 +0000)]
Initialize the obj->ws before we use it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2074
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 08:54:26 +0000 (08:54 +0000)]
Move the objects and their http header into storage instead of
malloc'ing them.
This should reduce the N(nobj) swap-loading considerably.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2073
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 07:45:58 +0000 (07:45 +0000)]
Move the workerthreads log from malloc to stack.
Dump sizes of various structures on startup.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2072
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 07:27:37 +0000 (07:27 +0000)]
Eliminate a & which I tend to forget every single time.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2071
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Mon, 1 Oct 2007 07:21:26 +0000 (07:21 +0000)]
We always want to go through vcl_fetch(), even on error 503
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2070
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 21:27:16 +0000 (21:27 +0000)]
Add VCL action "esi" and a vrt file to contain it.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2069
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 21:11:21 +0000 (21:11 +0000)]
Make the number of restarts a parameter.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2068
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:57:30 +0000 (20:57 +0000)]
Add the first stab at a "restart" mechanism.
The intent is to be able to do things like:
backend b1 {
set backend.host = "fs.freebsd.dk";
set backend.port = "82";
}
backend b2 {
set backend.host = "fs.freebsd.dk";
set backend.port = "81";
}
backend b3 {
set backend.host = "fs.freebsd.dk";
set backend.port = "80";
}
sub vcl_recv {
remove req.http.cookie;
if (req.restarts == 0) {
set req.backend = b1;
} else if (req.restarts == 1) {
set req.backend = b2;
} else {
set req.backend = b3;
}
}
sub vcl_fetch {
if (obj.status != 200) {
restart;
}
}
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2067
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:38:15 +0000 (20:38 +0000)]
Add req.restarts variable.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2066
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:36:16 +0000 (20:36 +0000)]
Add "restart" action for most VCL methods.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2065
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:19:50 +0000 (20:19 +0000)]
Evict backend-health code which had strayed fra from it's proper place.
cache_fetch.c now reports the response code or a indicative negative
status for failed requests to the backend code.
Any timeouts, keepalives or other overhead processing of health codes
should happen in a thread in the backend handling.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2064
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:16:28 +0000 (20:16 +0000)]
More caching of HTTP status
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2063
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 20:08:26 +0000 (20:08 +0000)]
Cache the numeric status code.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2062
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 19:54:28 +0000 (19:54 +0000)]
Significantly reduce level of paranoia.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2061
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 19:54:06 +0000 (19:54 +0000)]
We may not have a worker thread here, we could be called from the
acceptor code on a timeout.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2060
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 19:44:06 +0000 (19:44 +0000)]
Remove unused #includes
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2059
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 19:42:16 +0000 (19:42 +0000)]
nitpicking
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2058
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sun, 30 Sep 2007 19:42:08 +0000 (19:42 +0000)]
Set the poll'ed fd to -1 when we halfclose the fd to avoid
an infinite loop on certain OS's.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2057
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Sat, 29 Sep 2007 20:53:53 +0000 (20:53 +0000)]
Another cleanup commit:
Get rid of the httptag enum, we can use the HTTP_T values instead.
Introduce WSP macro to wrap log entries which has a session.
Add our own vctyp() character classifier to simplify HTTP protocol
message parsing.
Unify http_DissectRequest() and http_DissectResponse() processing.
Unify writing of the 5 byte SHMLOG header and other minor cleanups
to shmlog code.
Silence some signed/unsigned/int width warnings in FlexeLint
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2056
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Sep 2007 20:13:48 +0000 (20:13 +0000)]
Complete the split of HTTP-editing and HTTP-transmission functions.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2055
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Sep 2007 13:13:11 +0000 (13:13 +0000)]
Initial split of code which transfer HTTP protocol messages
over sockets and things which manipulate them in memory.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2054
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Sep 2007 13:04:53 +0000 (13:04 +0000)]
Move the WS_ prototypes down where they belong.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2053
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Sep 2007 11:07:14 +0000 (11:07 +0000)]
Push the http structure out of the early bits of the reception code.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2052
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Fri, 28 Sep 2007 10:29:12 +0000 (10:29 +0000)]
Preparation for implementation of restarts: Move the ws from http to
the containing object (session or obj).
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2051
d4fa192b -c00b-0410-8231-
f00ffab90ce4
des [Thu, 27 Sep 2007 10:08:30 +0000 (10:08 +0000)]
Use CHECK_OBJ_ORNULL().
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2050
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 19:43:56 +0000 (19:43 +0000)]
don't make acl's const, they are not.
Reported by: Martin Aspeli <optilude@gmx.net>
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2049
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 19:38:04 +0000 (19:38 +0000)]
More txt'ing
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2048
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 19:20:17 +0000 (19:20 +0000)]
another place we can use Tlen
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2047
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 19:15:25 +0000 (19:15 +0000)]
Use the new txt type more extensively, it does improve readability a bit.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2046
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 18:59:28 +0000 (18:59 +0000)]
Convert the received request and pipelined bytes into txt's.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2045
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Wed, 26 Sep 2007 18:56:18 +0000 (18:56 +0000)]
struct http_hdr is more than that, it is a general text handle, so
typedef it as "txt" instead.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2044
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 25 Sep 2007 13:19:07 +0000 (13:19 +0000)]
More flexelint nit-picking of various sorts
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2043
d4fa192b -c00b-0410-8231-
f00ffab90ce4
phk [Tue, 25 Sep 2007 11:51:49 +0000 (11:51 +0000)]
Constify a lot of the VRT API
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2042
d4fa192b -c00b-0410-8231-
f00ffab90ce4