From anders at fupp.net Mon Feb 1 09:35:41 2010 From: anders at fupp.net (Anders Nordby) Date: Mon, 1 Feb 2010 10:35:41 +0100 Subject: r4480 - trunk/varnish-cache/bin/varnishncsa In-Reply-To: <20100125121922.9C4631F7C7E@projects.linpro.no> References: <20100125121922.9C4631F7C7E@projects.linpro.no> Message-ID: <20100201093541.GA88919@fupp.net> Hi, I must object to this change, as I use varnishncsa -b extensively to pull out reports on missed objects being fetch from the backends too often. Please revert this change, as varnishncsa -b has its use. Anders. On Mon, Jan 25, 2010 at 01:19:22PM +0100, kristian at projects.linpro.no wrote: > Author: kristian > Date: 2010-01-25 13:19:22 +0100 (Mon, 25 Jan 2010) > New Revision: 4480 > > Modified: > trunk/varnish-cache/bin/varnishncsa/varnishncsa.c > Log: > Only handle client requests (-c) for varnishncsa > > Fixes #617 > > > Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c > =================================================================== > --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2010-01-25 11:36:43 UTC (rev 4479) > +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2010-01-25 12:19:22 UTC (rev 4480) > @@ -553,6 +553,13 @@ > case 'w': > w_arg = optarg; > break; > + case 'b': > + fprintf(stderr, "-b is not valid for varnishncsa\n"); > + exit(1); > + break; > + case 'c': > + /* XXX: Silently ignored: it's required anyway */ > + break; > default: > if (VSL_Arg(vd, c, optarg) > 0) > break; > @@ -560,6 +567,8 @@ > } > } > > + VSL_Arg(vd, 'c', optarg); > + > if (VSL_OpenLog(vd, n_arg)) > exit(1); > > > _______________________________________________ > varnish-commit mailing list > varnish-commit at projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-commit -- Anders. From ask at develooper.com Mon Feb 1 17:44:59 2010 From: ask at develooper.com (=?iso-8859-1?Q?Ask_Bj=F8rn_Hansen?=) Date: Mon, 1 Feb 2010 09:44:59 -0800 Subject: r4480 - trunk/varnish-cache/bin/varnishncsa In-Reply-To: <20100201093541.GA88919@fupp.net> References: <20100125121922.9C4631F7C7E@projects.linpro.no> <20100201093541.GA88919@fupp.net> Message-ID: On Feb 1, 2010, at 1:35, Anders Nordby wrote: > I must object to this change, as I use varnishncsa -b extensively to > pull out reports on missed objects being fetch from the backends too > often. Please revert this change, as varnishncsa -b has its use. I don't know why it was removed or if there's a good alternative, but I've found the -b option very useful, too. - ask From phk at phk.freebsd.dk Mon Feb 1 18:50:47 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Mon, 01 Feb 2010 18:50:47 +0000 Subject: r4480 - trunk/varnish-cache/bin/varnishncsa In-Reply-To: Your message of "Mon, 01 Feb 2010 09:44:59 PST." Message-ID: <44229.1265050247@critter.freebsd.dk> In message , =?iso-8859-1? Q?Ask_Bj=F8rn_Hansen?= writes: > >On Feb 1, 2010, at 1:35, Anders Nordby wrote: > >> I must object to this change, as I use varnishncsa -b extensively to >> pull out reports on missed objects being fetch from the backends too >> often. Please revert this change, as varnishncsa -b has its use. > >I don't know why it was removed or if there's a good alternative, >but I've found the -b option very useful, too. Well, the code to implement it full was never there, and people were reporting core dumps because of it, so we figured we would make the non-support for -b explicit, until the code could be written. There are no objections to supporting it, it's just code to be written by somebody... (nudge, nudge, wink, wink...) Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From anders at fupp.net Tue Feb 2 12:31:33 2010 From: anders at fupp.net (Anders Nordby) Date: Tue, 2 Feb 2010 13:31:33 +0100 Subject: r4480 - trunk/varnish-cache/bin/varnishncsa In-Reply-To: <44229.1265050247@critter.freebsd.dk> References: <44229.1265050247@critter.freebsd.dk> Message-ID: <20100202123132.GA89144@fupp.net> Hi, On Mon, Feb 01, 2010 at 06:50:47PM +0000, Poul-Henning Kamp wrote: >>> I must object to this change, as I use varnishncsa -b extensively to >>> pull out reports on missed objects being fetch from the backends too >>> often. Please revert this change, as varnishncsa -b has its use. > >I don't know why it was removed or if there's a good alternative, > >but I've found the -b option very useful, too. > Well, the code to implement it full was never there, and people were > reporting core dumps because of it, so we figured we would make the > non-support for -b explicit, until the code could be written. > > There are no objections to supporting it, it's just code to be > written by somebody... (nudge, nudge, wink, wink...) >From a developer point of view, I understand that this feature must be improved or removed. But from a user point of view, it has its use, and it IS in use. Will this patch be backed out or not? Do I have to use patches to see backend traffic in a simple Apache style log? Bye, -- Anders. From pbruna at it-linux.cl Wed Feb 17 12:07:32 2010 From: pbruna at it-linux.cl (Patricio A. Bruna) Date: Wed, 17 Feb 2010 09:07:32 -0300 (CLST) Subject: Host Backend header Message-ID: <17041396.35461266408452500.JavaMail.root@lisa.itlinux.cl> Hi, I have setuped 2 varnish serves. In front of them there are a cluster of F5 which are doing Load Balancing against this 2 varnish. I need a way to add a http header to show which varnish answer the request. This is for validating the load balancing Any way to do this? thanks. ------------------------------------ Patricio Bruna V. IT Linux Ltda. www.it-linux.cl Fono : (+56-2) 333 0578 M?vil: (+56-9) 7776 2899 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zimbra_gold_partner.png Type: image/png Size: 2893 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zimbraTraining.gif Type: image/gif Size: 3309 bytes Desc: not available URL: From paul.mansfield at taptu.com Wed Feb 17 13:44:28 2010 From: paul.mansfield at taptu.com (Paul Mansfield) Date: Wed, 17 Feb 2010 13:44:28 +0000 Subject: Host Backend header In-Reply-To: <17041396.35461266408452500.JavaMail.root@lisa.itlinux.cl> References: <17041396.35461266408452500.JavaMail.root@lisa.itlinux.cl> Message-ID: <4B7BF2BC.8010401@taptu.com> first result for google "varnish add header" was the faq... http://varnish-cache.org/wiki/FAQ#HowdoIaddaHTTPheader From luigi.lauro at gmail.com Thu Feb 18 19:29:28 2010 From: luigi.lauro at gmail.com (Luigi Lauro) Date: Thu, 18 Feb 2010 20:29:28 +0100 Subject: varnishncsa - added VirtualHost support Message-ID: <71ec90821002181129v293561bbp37eed217a8ec46ac@mail.gmail.com> Hi everyone, first of all, a big *THANK YOU*, varnish is pure awesomeness. The only thing I missed, is having varnishncsa log in the 'unofficial standard' of modified NCSA, with virtualhost name included as second field. Even lighttpd and other webserver default to that logging format, and so it's very useful for interoperability (awstats, etc...) to have varnish log in the very same way. So i just easily added a "-v" option to varnishncsa.c bin to change the second field from a static '-' to the correct vhost name, normalizing the URL as well for consistency reason. My work is based on rhalff original patch, I just modified it a bit since rhalff version added the vhost field in FRONT of log line. I wanted it to be 100% compatible witih lighttpd logging format, so I altered it to my needs. You can find both versions at: http://varnish-cache.org/ticket/485 Would be wonderful to see it in upcoming varnish release, so I won't have to manually patch varnish port every time (i'm on a freebsd 8 box). NOTE: i've checked the trunk to be sure i was not doing something obvious and already in trunk on SVN, but seems not. Keep up the wonderful work ;-) Ciao ciao! -- Luigi Lauro From eran at sandler.co.il Sun Feb 21 10:21:50 2010 From: eran at sandler.co.il (Eran Sandler) Date: Sun, 21 Feb 2010 12:21:50 +0200 Subject: adding header question Message-ID: Hi all, I'm sure this is probably a minor thing that I'm missing. What I want to do is something rather simple. I want to add a header to requests that go to the backend. This header is not on the original request. Some of the requests go to the backend through pass and I want to make sure that header is on that request as well. I tried setting the header in vcl_recv (set req.http.MyHeader = "1";), vcl_pass (set bereq.http.MyHeader ="1") and in a couple of other places, but it doesn't seem to get sent to the backend. I would appreciate any help. Thanks, Eran -------------- next part -------------- An HTML attachment was scrubbed... URL: From blake at heroku.com Mon Feb 22 18:56:22 2010 From: blake at heroku.com (Blake Mizerany) Date: Mon, 22 Feb 2010 10:56:22 -0800 Subject: varnishncsa -H logs hits only Message-ID: <7684ee261002221056i44f6f35dk719b36fd94fbb1dc@mail.gmail.com> Dear fellow devs, I added support to varnishncsa to log cache-hits only a few weeks ago but haven't seen any activity on the ticket. I'm going to try my luck here. Here is the ticket: http://varnish-cache.org/ticket/646 We (Heroku - heroku.com) have found this to be very useful when in both production, and development modes. I would be honored if it made it upstream. Are there any objections? questions? WTF's? Sincerely, Blake Mizerany From phk at phk.freebsd.dk Tue Feb 23 08:19:08 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 23 Feb 2010 08:19:08 +0000 Subject: adding header question In-Reply-To: Your message of "Sun, 21 Feb 2010 12:21:50 +0200." Message-ID: <25692.1266913148@critter.freebsd.dk> In message , Eran Sandler writes: >I tried setting the header in vcl_recv (set req.http.MyHeader = "1";), >[...] but it doesn't seem to get sent to the backend. That should work. Try running varnishlog, and keep an eye on the "TxHeader" lines, which show what is sent to the backend. You can also enable the vcl_trace parameter, which will put records into the varnishlog, with line+char_pos of the VCL as it is executed. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From eran at sandler.co.il Tue Feb 23 15:27:32 2010 From: eran at sandler.co.il (Eran Sandler) Date: Tue, 23 Feb 2010 17:27:32 +0200 Subject: adding header question In-Reply-To: <25692.1266913148@critter.freebsd.dk> References: <25692.1266913148@critter.freebsd.dk> Message-ID: Thanks. I'll give it a shot and see how it goes. Eran On Tue, Feb 23, 2010 at 10:19 AM, Poul-Henning Kamp wrote: > In message , > Eran > Sandler writes: > > >I tried setting the header in vcl_recv (set req.http.MyHeader = "1";), > >[...] but it doesn't seem to get sent to the backend. > > That should work. > > Try running varnishlog, and keep an eye on the "TxHeader" lines, which > show what is sent to the backend. > > You can also enable the vcl_trace parameter, which will put records > into the varnishlog, with line+char_pos of the VCL as it is executed. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk at FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From djekels at DRWHoldings.com Tue Feb 23 17:02:34 2010 From: djekels at DRWHoldings.com (Donny Jekels) Date: Tue, 23 Feb 2010 11:02:34 -0600 Subject: 1 of 145 tests failed Message-ID: <3BA21E9E032B22479310705FCAE2A010064F4C8B@DRWUSEXCHANGE.US.DRWHoldings.com> PASS: ./tests/v00024.vtc =============================================== 1 of 145 tests failed Please report to varnish-dev at projects.linpro.no =============================================== make[3]: *** [check-TESTS] Error 1 make[3]: Leaving directory `/opt/varnish-2.0.6/bin/varnishtest' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/opt/varnish-2.0.6/bin/varnishtest' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/opt/varnish-2.0.6/bin' make: *** [check-recursive] Error 1 Donny Jekels | Sr. Unix Engineer | DRW Trading Group T 312.542.3257 | C 312.342.8212 | F 312.526.5627 Chicago, IL 60661-2555 This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mokplan at gmail.com Sun Feb 28 12:06:01 2010 From: mokplan at gmail.com (Moshe Kaplan) Date: Sun, 28 Feb 2010 14:06:01 +0200 Subject: Response Content Modifications Message-ID: We would like to modify the returned response from the back end (not only the response headers, but the content itself as well): 1. Is it possible? 2. If so, using VCL or inline/embedded C? 3. What functions should be used for that? Best, Moshe -------------- next part -------------- An HTML attachment was scrubbed... URL: From sky at crucially.net Sun Feb 28 12:21:37 2010 From: sky at crucially.net (sky at crucially.net) Date: Sun, 28 Feb 2010 12:21:37 +0000 Subject: Response Content Modifications In-Reply-To: References: Message-ID: <1231144897-1267359699-cardhu_decombobulator_blackberry.rim.net-225724664-@bda578.bisx.prod.on.blackberry> Use esi and synthetic responses from inside esi? Sent via BlackBerry by AT&T -----Original Message----- From: Moshe Kaplan Date: Sun, 28 Feb 2010 14:06:01 To: Subject: Response Content Modifications _______________________________________________ varnish-dev mailing list varnish-dev at projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev From mokplan at gmail.com Sun Feb 28 14:00:40 2010 From: mokplan at gmail.com (Moshe Kaplan) Date: Sun, 28 Feb 2010 16:00:40 +0200 Subject: Response Content Modifications In-Reply-To: <1231144897-1267359699-cardhu_decombobulator_blackberry.rim.net-225724664-@bda578.bisx.prod.on.blackberry> References: <1231144897-1267359699-cardhu_decombobulator_blackberry.rim.net-225724664-@bda578.bisx.prod.on.blackberry> Message-ID: I'm looking for something that is more like: set obj.http.body = my_req.body; The target is to modify the received content from the backend (for example changing embedded URLs in HTML, removing parts of the content based on regular expressions and so on). P.S. I don't have control on the back end content, so I cannot use esi. On Sun, Feb 28, 2010 at 2:21 PM, wrote: > Use esi and synthetic responses from inside esi? > Sent via BlackBerry by AT&T > > -----Original Message----- > From: Moshe Kaplan > Date: Sun, 28 Feb 2010 14:06:01 > To: > Subject: Response Content Modifications > > _______________________________________________ > varnish-dev mailing list > varnish-dev at projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-dev > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Sun Feb 28 17:06:29 2010 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sun, 28 Feb 2010 17:06:29 +0000 Subject: Response Content Modifications In-Reply-To: Your message of "Sun, 28 Feb 2010 16:00:40 +0200." Message-ID: <3289.1267376789@critter.freebsd.dk> In message , Moshe Kaplan writes: >The target is to modify the received content from the backend (for example >changing embedded URLs in HTML, removing parts of the content based on >regular expressions and so on). > >P.S. I don't have control on the back end content, so I cannot use esi. Sorry for asking a point blank rude question, but what you describes sounds like theft of copyrighted content from somebody else. Do you have the necessary legal rights to use the contents on the backend ? Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From mokplan at gmail.com Sun Feb 28 17:28:30 2010 From: mokplan at gmail.com (Moshe Kaplan) Date: Sun, 28 Feb 2010 19:28:30 +0200 Subject: Response Content Modifications In-Reply-To: <3289.1267376789@critter.freebsd.dk> References: <3289.1267376789@critter.freebsd.dk> Message-ID: No, This is a clear case of system integration, In many production systems, you cannot change the code itself, since it involves in major risks (when you change a single line of code, you never know where do you end at). However, several methods of reverse proxy can still can be very useful in these systems. I'll be glad for a reference in the code, and will glad to contribute to the code base if it is needed to accomplish this task. On Sun, Feb 28, 2010 at 7:06 PM, Poul-Henning Kamp wrote: > In message , > Moshe > Kaplan writes: > > >The target is to modify the received content from the backend (for example > >changing embedded URLs in HTML, removing parts of the content based on > >regular expressions and so on). > > > >P.S. I don't have control on the back end content, so I cannot use esi. > > Sorry for asking a point blank rude question, but what you describes > sounds like theft of copyrighted content from somebody else. > > Do you have the necessary legal rights to use the contents on the backend ? > > Poul-Henning > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk at FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > -------------- next part -------------- An HTML attachment was scrubbed... URL: