• Dag Erling Smørgrav's avatar
    Merged revisions 1649-1650,1655-1692 via svnmerge from · cb3214a6
    Dag Erling Smørgrav authored
    svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
    
    ........
      r1657 | phk | 2007-07-05 23:08:15 +0200 (Thu, 05 Jul 2007) | 2 lines
      
      Clean up FlexeLint fluff.
    ........
      r1658 | phk | 2007-07-06 12:07:30 +0200 (Fri, 06 Jul 2007) | 3 lines
      
      Don't rewrite pipe'ed requests to "GET".
    ........
      r1659 | phk | 2007-07-09 22:23:41 +0200 (Mon, 09 Jul 2007) | 10 lines
      
      Make all protocol header fields writable, except obj.status and resp.status
      (which are numeric, they'll follow shortly)
      
      Unify the shmemlog tag used for failure to rewrite something, the Rx/Tx/Obj
      distinction is not helpful enough to warrant the complexity of it.
    ........
      r1660 | phk | 2007-07-09 22:34:59 +0200 (Mon, 09 Jul 2007) | 2 lines
      
      Allow assignment to INT type variables
    ........
      r1661 | phk | 2007-07-09 22:35:20 +0200 (Mon, 09 Jul 2007) | 2 lines
      
      Allow assignment to obj.status and resp.status
    ........
      r1662 | phk | 2007-07-10 21:46:16 +0200 (Tue, 10 Jul 2007) | 6 lines
      
      Move string stuff to vcc_string.c, there's going to be a fair bit of it.
      
      Give vcc_StringVal() a return value to say if it did anything so we can
      emit better error messages when confused.
    ........
      r1663 | phk | 2007-07-10 21:59:39 +0200 (Tue, 10 Jul 2007) | 5 lines
      
      Add conversion from IP to string format to allow things like:
      
      	set bereq.http.HeyYou = client.ip " asked for  " req.url;
    ........
      r1664 | phk | 2007-07-10 22:07:07 +0200 (Tue, 10 Jul 2007) | 3 lines
      
      Properly emit the header name in VRT_SetHdr();
    ........
      r1665 | phk | 2007-07-10 22:08:39 +0200 (Tue, 10 Jul 2007) | 2 lines
      
      Fix VRT_SetHdr() prototype
    ........
      r1666 | phk | 2007-07-10 22:43:24 +0200 (Tue, 10 Jul 2007) | 2 lines
      
      Add compiler side support for regsub() but only a dummy function in VRT.
    ........
      r1667 | phk | 2007-07-10 23:30:47 +0200 (Tue, 10 Jul 2007) | 60 lines
      
      Add "regsub" support for string manipulation.
      
      Notice this facility is subject to change!
      
      "regsub" is short for regular expression substitution and it is probably
      easiest to explain with some examples:
      
      	sub vcl_recv {
      		set req.url = regsub(req.url, "#.*", "");
      	}
      
      This will replace the requests URL with the output of the regsub() function
      
      regsub() takes three arguments: the string to be examined, a regular
      expression and a replacement string.
      
      In this case, everything after the first '#' is removed (replaced
      with nothing).
      
      The replacement string recognizes the following magic sequences:
      	&	- insert everything matched by the regexp
      	$0	- ditto.
      	$1	- replace with the first submatch of the regexp
      	$2	- replace with the second submatch of the regexp
      	...
      	$9	- replace with the ninth submatch of the regexp
      
      (The $0..$9 syntax was chosen over the \0...\9 syntax in order to avoid
      a nightmare of escape characters in the VCL source code.  Arguments and
      suggestions are welcome).
      
      A more advanced example:
      
      	set bereq.http.ClientIP = regsub(client.ip, "(.*):(.*)", "$2 $1");
      
      The client.ip variable expands to IP:port number, for instance
      	127.0.0.1:54662
      
      The regular expression "(.*):(.*)" results in the the following matches:
      	& + $0		"127.0.0.1:54662"
      	$1		"127.0.0.1"
      	$2		"54662"
      
      So the replacement string "$2 $1" results in "54662 127.0.0.1"
      
      And the completed header which is sent to the backend will look like:
      
      	"ClientIP: 54662 127.0.0.1"
      
      An even more advanced example would be:
      
          set bereq.http.magic = "Client IP = " regsub(client.ip, ":", " port = ");
      
      Where we also exploint the string concatenation ability of the "set" statement.
      
      The result string is built in the request workspace, so you may need
      to increase the workspace size if you do a lot of regsub()'s.
      
      Currently there is no decent error handling for running out of workspace.
    ........
      r1668 | phk | 2007-07-12 11:04:54 +0200 (Thu, 12 Jul 2007) | 6 lines
      
      Add TIM_mono() and TIM_real() which return double representations of
      timestamps on a monotonic and the UTC timescales respectively.
      
      Doubles are much more convenient than timespecs for comparisons etc.
    ........
      r1669 | phk | 2007-07-12 11:25:07 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Replace ev_now() with TIM_mono().
    ........
      r1670 | phk | 2007-07-12 11:25:45 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Replace Uptime() with TIM_mono()
    ........
      r1671 | phk | 2007-07-12 11:49:26 +0200 (Thu, 12 Jul 2007) | 6 lines
      
      Change all timekeeping to use doubles instead of time_t and struct timespec.
      
      Eliminate all direct calls to time(2) and clockgettime(2) and use TIM_real()
      and TIM_mono() exclusively.
    ........
      r1672 | phk | 2007-07-12 12:00:13 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Document timescale of srcaddr->ttl
    ........
      r1673 | phk | 2007-07-12 12:13:29 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Convert the last time(2) calls to TIM_real()
    ........
      r1674 | cecilihf | 2007-07-12 12:20:33 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Added a new cli option, status, for checking the status of the varnish child process. This is for use in the webmin plugin.
    ........
      r1675 | cecilihf | 2007-07-12 12:27:37 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Fixed typo
    ........
      r1676 | des | 2007-07-12 18:00:04 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      RT_LIBS dependency has moved from varnishd to libvarnish.
    ........
      r1677 | des | 2007-07-12 18:02:47 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      Add missing semicolon.
    ........
      r1678 | des | 2007-07-12 19:37:44 +0200 (Thu, 12 Jul 2007) | 2 lines
      
      sockaddr.sa_len is not portable.
    ........
      r1682 | phk | 2007-07-13 09:11:54 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Initialize all timestamps in the session to NAN
    ........
      r1683 | phk | 2007-07-13 09:21:46 +0200 (Fri, 13 Jul 2007) | 4 lines
      
      Unify the recycle functionality of the acceptors, all three used the same
      method.
    ........
      r1684 | phk | 2007-07-13 09:27:50 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Clean all but t_open timestamps to NAN at end of transaction.
    ........
      r1685 | phk | 2007-07-13 09:47:45 +0200 (Fri, 13 Jul 2007) | 9 lines
      
      Rename the "idle" field of struct worker to "used", which is more precise.
      
      Don't use the "used" field to signal suicide for worker threads,
      use the "wrq" field which is much more natural.
      
      Set the "used" field to NAN before doing anything and assert that
      somebody updated during the task.
    ........
      r1686 | phk | 2007-07-13 09:53:08 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Clarify XXX comment
    ........
      r1687 | phk | 2007-07-13 09:58:11 +0200 (Fri, 13 Jul 2007) | 3 lines
      
      Move setting of t_resp up to before we build the response.
    ........
      r1688 | phk | 2007-07-13 10:05:14 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Add an XXX comment
    ........
      r1690 | des | 2007-07-13 13:42:02 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Add an entry for r1531.
    ........
      r1691 | des | 2007-07-13 16:27:55 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Document regsub().
    ........
      r1692 | des | 2007-07-13 16:53:48 +0200 (Fri, 13 Jul 2007) | 2 lines
      
      Document recent changes.
    ........
    
    
    git-svn-id: http://www.varnish-cache.org/svn/branches/1.1@1693 d4fa192b-c00b-0410-8231-f00ffab90ce4
    cb3214a6
Name
Last commit
Last update
bin Loading commit data...
debian Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
man Loading commit data...
redhat Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
varnishapi.pc.in Loading commit data...