- 19 Apr, 2007 25 commits
-
-
Dag Erling Smørgrav authored
Introduce table based search for actions, and make "set" the first one. This eliminates the need to have the identifier "set" be its own token rather than being a simple ID. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1340 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Split the parsing of actions into a separate file, this is the bit I expect to grow the most in the near future and all actions have a lot more in common, than they have with conditionals etc. Apply more vcc_ prefixes. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1339 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
I got confused about the terminology. An action is something we do in the program, a "return" is when we quit the program. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1338 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Better syntax checking of "set" statements. Remove inapplicable comment. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1337 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Fix typo, so we correctly recognize '-=' as T_DECR token. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1336 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Pidgin BNF syntax of VCL git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1335 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Overhaul cross reference checks in vcc compiler Move and isolate cross reference stuff to it's own source file (vcc_xref.c) and use vcc_ prefix as originally intended. Also warn about multiple definitions of objects. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1334 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Improve error message layout and information. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1333 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Overhaul compiler to get rid of memory leaks and other bogons. Add a memlist to the tokenlist and a function which allocates with malloc(3) and hangs the piece on the memlist of tokenlist. At the end of compilation, we ditch everything on the list. Handle vrt_obj.h like the other #includes, and stuff these into a vsb instead of directly to a file. Free decoded token string, if any. Pull creation and destruction of tokenlist into separate functions for code clarity. Remember to destry everything in the tokenlist. Pull invocation of cc(1) into a separate function and change the way we do it, so we get any cc(1) groans and whines back in the vsb so a CLI user will see them. More errorchecks than before. More comments throughout. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1332 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Rewrite using sbufs. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1331 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
The argv length calculation was not only off by one, but failed to take into account the extra space required by expanded quotes, backslashes and newlines. Instead of pre-allocating a (possibly too short) buffer, start with a 64-byte buffer and double it every time we come close to filling it up. Also, avoid appending a trailing space before the final newline. This issue was uncovered by Kristoffer Gleditsch <kristoffer@linpro.no>, who also helped test this patch. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1330 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Expand and track recent changes. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1329 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Actual default max is 1000, not infinity. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1328 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Twist the compiler logic around a bit. Concatenate all definitions of the method functions into one instance of the function: sub vcl_pipe { foo; } sub vcl_pipe { bar; } is now the same as sub vcl_pipe { foo; bar; } This avoids all the magic related to the default functions and hopefully makes the newly introduced "include" facility much more useful. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1327 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Split off the parsing from vcc_compile.c into vcc_parse.c git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1326 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
use tl-> consistently git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1325 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Implement a facility for source file modularization in the VCL compiler. The syntax is: include "filename" ; Unlike the C preprocessors #include directive, a VCL include can appear anywhere in the sourcefile: if {req.Cookie == include "cookie.vcl" ; || !req.Host } { } and have cookie.vcl contain just: "8435398475983275293759843" Technically this results in a change to how we account for source code references in the counter/profile table as well, and as a result the entire source code of the VCL program is now compiled into the shared library for easy reference. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1324 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Make Varnish able to accept connections from multiple sockets by specifying a whitespace separated list of addresses to -a (or param.set listen_address). I'm not sure about the error handling, for instance, what is the desirable behaviour if one of multiple sockets fail to open ? Suggested by: <darryl.dixon@winterhouseconsulting.com> git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1323 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Add missing "volatile" qualifiers on generic tweakers. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1322 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Add a bit of garbage collection to yesterdays change: Passed objects need to have their storage properly reclaimed, including the actual content of a obj.pass=1 cache entry, once we have sent the content to the original requestor. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1321 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Having thought long and hard about this, commit what I think is the new and simpler flow for version2. Pass is now handled like a miss where the object will not be cached. The main result of this is that we drag the entire object, header and body, from the backend before transmitting it to the client, thus isolating the backend from slow clients. From a software engineering point of view it is a big improvement, because it eliminates the need for all of cache_pass.c and we therefore end up with less HTTP protocol implementations. A side effect of this is that ticket #56 should be fixed now. If the object is pass'ed before vcl_fetch{} that is, in vcl_recv{}, vcl_hit{} or vcl_miss{}, no "pass this" object is inserted in the cache. The confusion between "pass", "insert" and "insert_pass" has been cleaned up, by the removal of the latter. Pipe and Pass calls vcl_pipe{} and vcl_pass{} respectively, before contacting the backend. I havn't quite decided if they should operate on the request header from the client or the one to the backend, or both. One possible use is to inject a "Connection: close" header to limit pipe to one transaction. A new vcl_hash{} has been added, it will allow customization of which fields we hash on, instead of the default "url + Host:" but this is not yet implemented. vcl_fetch{} is now called after both the headers and body have been picked up from the backend. This will allow us to do more comprehensive handling of backend errors later on. A disadvantage to this is that if the object ends up as a "pass this" object in the cache, we could possibly have released any queued requests already after the headers were received. If this is transpires as a real-world problem, we can add a vcl_fetchhdr{} which can do an early release (ie: "pass"). git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1320 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Postremove for debian git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1319 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
numeric value for VARNISH_MAX_WORKER_THREADS git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1318 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Include Debian and RedHat package metadata in the tarball. This makes life a lot easier for our packagers. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1317 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Consistently use UTF-8 for non-ASCII characters. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1316 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 01 Apr, 2007 3 commits
-
-
Poul-Henning Kamp authored
This eliminates the need to have the identifier "set" be its own token rather than being a simple ID. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1297 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
I expect to grow the most in the near future and all actions have a lot more in common, than they have with conditionals etc. Apply more vcc_ prefixes. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1296 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
in the program, a "return" is when we quit the program. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1295 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 31 Mar, 2007 5 commits
-
-
Poul-Henning Kamp authored
Remove inapplicable comment. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1294 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1293 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1292 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
Move and isolate cross reference stuff to it's own source file (vcc_xref.c) and use vcc_ prefix as originally intended. Also warn about multiple definitions of objects. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1291 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1290 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 30 Mar, 2007 2 commits
-
-
Poul-Henning Kamp authored
Add a memlist to the tokenlist and a function which allocates with malloc(3) and hangs the piece on the memlist of tokenlist. At the end of compilation, we ditch everything on the list. Handle vrt_obj.h like the other #includes, and stuff these into a vsb instead of directly to a file. Free decoded token string, if any. Pull creation and destruction of tokenlist into separate functions for code clarity. Remember to destry everything in the tokenlist. Pull invocation of cc(1) into a separate function and change the way we do it, so we get any cc(1) groans and whines back in the vsb so a CLI user will see them. More errorchecks than before. More comments throughout. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1289 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1288 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 29 Mar, 2007 1 commit
-
-
Dag Erling Smørgrav authored
into account the extra space required by expanded quotes, backslashes and newlines. Instead of pre-allocating a (possibly too short) buffer, start with a 64-byte buffer and double it every time we come close to filling it up. Also, avoid appending a trailing space before the final newline. This issue was uncovered by Kristoffer Gleditsch <kristoffer@linpro.no>, who also helped test this patch. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1287 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 28 Mar, 2007 2 commits
-
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1286 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1285 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 24 Mar, 2007 2 commits
-
-
Poul-Henning Kamp authored
Concatenate all definitions of the method functions into one instance of the function: sub vcl_pipe { foo; } sub vcl_pipe { bar; } is now the same as sub vcl_pipe { foo; bar; } This avoids all the magic related to the default functions and hopefully makes the newly introduced "include" facility much more useful. git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1284 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1283 d4fa192b-c00b-0410-8231-f00ffab90ce4
-