- 27 Jul, 2008 1 commit
-
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3029 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 25 Jul, 2008 8 commits
-
-
Poul-Henning Kamp authored
pool, and don't be so stingy with them: default to five. Make sure we really do create the minimum complement of threads. git-svn-id: http://www.varnish-cache.org/svn/trunk@3028 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
NB: Be careful with -trunk, this is a quite intrusive change. Continue the progress on synthetic/error pages The default "guru meditation" is now generated from the vcl_error {} function, which can be redefined to whatever suits your taste. Techinical: Add new vcl_error method and make variables available in it. Fix a bug in "error" action, where the numeric argument would not get interpreted correctly if it came from a variable like obj.status. Forbid "error" action in vcl_deliver since vcl_error now goes to vcl_deliver to send the error object. Fix test v00001 to reflect this. Move the obj->ws/http initialization to preallocation time to avoid duplication. Add read-only variable req.xid (a string!) Add default guru meditation to default vcl. Remove cache_synthetic.c which is now unecessary. git-svn-id: http://www.varnish-cache.org/svn/trunk@3027 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
This is just the initial version and it doesn't quite work the way we need it to yet, but the idea is to be able to say: sub vcl_fetch { if (obj.status == 503) { synthetic {" <HTML> <H1>Sorry, could not contact the backend server</H1> <P> Try again later. </P> <HR> <PRE> URL: "} req.url {" User Agnet: "} req.http.user-agent {" </PRE> </HTML> "}; } } A new VCL syntactic element have been introduced to do this: "the long string". A long string is anything from {" to "}, newlines, controlcharacters and all. (Normal "..." strings cannot contain control characters. Technical details: Don't NULL terminate string sequences in VRT context, we may have NULL cropping up as a legal value if a header is missing, add the magic "vrt_magic_string_end" for terminating string contactenation. git-svn-id: http://www.varnish-cache.org/svn/trunk@3026 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
The storage from this stevedore is backed by an autoextending vsb, which can be used to generate synthetic pages into. git-svn-id: http://www.varnish-cache.org/svn/trunk@3025 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3024 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
the time. To be reenabled when the code supports the desired functionality. git-svn-id: http://www.varnish-cache.org/svn/trunk@3023 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3022 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
size disks. Submitted by: wichert Fixes ticket 283 git-svn-id: http://www.varnish-cache.org/svn/trunk@3021 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 24 Jul, 2008 13 commits
-
-
Poul-Henning Kamp authored
principle of the situation. git-svn-id: http://www.varnish-cache.org/svn/trunk@3020 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
routine. Follow RFC2616 more closely, and make relative (ie: max-age) specifications take precedence over absolute specifications (Expires:) Add an explicit clock-skew window (parameter: clock_skew) and only interpret Expires: in absolute terms if the Date: header is inside this window. Explicit check for the case where the backend sends an Expires: which is before the Date:, even if the Date: is out side our window. git-svn-id: http://www.varnish-cache.org/svn/trunk@3019 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
non-XML detector logic. Add a testcase to see if it works and that we can override it. git-svn-id: http://www.varnish-cache.org/svn/trunk@3018 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
picks off your loopback interface. git-svn-id: http://www.varnish-cache.org/svn/trunk@3017 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
like XML. Our definition of "looks like XML" is that the first non-white-space character is '<'. Add a new parameter "esi_syntax" with bits to steer the ESI parser. Use the first bit to disable the "looks like XML" check. git-svn-id: http://www.varnish-cache.org/svn/trunk@3016 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3015 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
Test caching of synthetic error pages (broken since 2266). This will need revisiting once caching has been reimplemented. git-svn-id: http://www.varnish-cache.org/svn/trunk@3014 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3013 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3012 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3011 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3010 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3009 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Dag Erling Smørgrav authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3008 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 23 Jul, 2008 14 commits
-
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3007 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
there to stop us. Fixes #281 git-svn-id: http://www.varnish-cache.org/svn/trunk@3006 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3005 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3004 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3003 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@3002 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
The problem is that a TCP connection to 127.0.0.1 appearantly does not originate on the loopback interface, but on some other interface on the machine. git-svn-id: http://www.varnish-cache.org/svn/trunk@3001 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
might not be there yet. git-svn-id: http://www.varnish-cache.org/svn/trunk@3000 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2999 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2998 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2997 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2996 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
Add IPv6 support (untested!) Implement evil-acls IPv6 support ------------ I have implemented IPv6 filtering support, but I have done so blindly as I have no IPv6 networks to test with. Please double check before relying on this to work, and please report your findings back to us. Syntax ------ The ACL rules still have the same syntax, but the sematics have expanded to handle IPv6 also: acl foo { "foohost"; // Match, if the address is one of the // ipv4 or ipv6 addresses of "foohost" ! "foohost"; // Fail, if... "192.168.1.7" / 24; // Use mask for comparison: The '7' is // ignored // Implicit masks: !"172.16"; // Fail 172.16.0.0 to 172.16.255.255 "10.0.0"; // Match 10.0.0.0 to 10.0.0.255 "www.freebsd.org" / 24; // This will give compile error, because // the "www.freebsd.org" has both ipv4 // and ipv6 addresses, and using the same // mask for both kinds do not make sense. ( ... ); // Ignore this rule if DNS lookup fails. ( ! "idiot.net" ); // If we can resolve "idiot.net", then // return Failure to match, if we see them. } Please notice that DNS lookup happens *only* on VCL compilation, if a DNS record changes you need to recompile (ie: vcl.load or vcl.inline) your VCL code again, it is not enough to just switch vcl (vcl.use). (This is the same as with backend DNS lookups) Evil-acls --------- Most firewall or ip-filtering facilities, compile the lists of networks and masks to a table, and matches proceed sequentially through that table until the table is exhausted or a match is found. Since we compile our ACLs into C-code, we might as well implement the "evil-acl" concept, and compile the rules directly into C-code instead. An ACL like this: acl foo { "172.16"; !"172.16.17"; "172.16.17.18"; "172.16"/18; } Compiles to: if (fam == 2) { if (a[0] == 172) { if (a[1] == 16) { if (a[2] == 17) { if (a[3] == 18) { VRT_acl_log(sp, "MATCH bar " "172.16.17.18"); return (1); } VRT_acl_log(sp, "NEG_MATCH bar " "172.16.17"); return (0); } else if ((a[3] & 0xc0) == 0) { VRT_acl_log(sp, "MATCH bar " "172.16" "/18" ); return (1); } VRT_acl_log(sp, "MATCH bar " "172.16"); return (1); } } } VRT_acl_log(sp, "NO_MATCH bar"); return (0); As can be seen, for example the comparison with "172" is now shared for all four rules in the ACL, instead of being carried out once for each of the four rules. In addition to this optimization, the C-compiler will of course use its usual (and unusual) tricks to speed things up, quite likely inlining the ACL code in the VCL functions where they are referenced. It will also be noticed, that the compiler sorts the rules in "most specific order". This means that: "172.16.17.18"; gets tested before !"172.16.17"; even though it is listed later in the ACL. Previously we tested the rules in the order given. git-svn-id: http://www.varnish-cache.org/svn/trunk@2995 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Petter Knudsen authored
The following perl one-liner is useful: perl -ne 'if( $print == 1 ) { exit if( /^$/ ); eval "print " . $_; } $print = 1 if /default_vcl/;' mgt_vcc.c Fixes #135 (for now) git-svn-id: http://www.varnish-cache.org/svn/trunk@2994 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
- 22 Jul, 2008 4 commits
-
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2993 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2992 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Petter Knudsen authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2991 d4fa192b-c00b-0410-8231-f00ffab90ce4
-
Poul-Henning Kamp authored
git-svn-id: http://www.varnish-cache.org/svn/trunk@2990 d4fa192b-c00b-0410-8231-f00ffab90ce4
-