projects / org / ezproject2010 / ezvlogin / forum / general / working with custom headers
Find the Exponential Software extensions you want
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 40 |
Tuesday 17 February 2009 11:24:15 am Hi,
I've tested the extension on a varnish installation nearly the same .vcl file you provided as example. Usually we work with Custom Headers like:
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Tuesday 17 February 2009 11:56:00 pm Hi Norman,
first of all I have to apologize because I uploaded the wrong .vcl configuration files in the doc/ folder of the extension. I removed it in trunk and will be replaced by a .vcl for Varnish1 and another for Varnish2, but I need time to do this and unfortunately I am too busy at the moment :/ |
|
Member since: Posts: 40 |
Wednesday 18 February 2009 9:54:51 am Hi Jerome,
I've tested a bit around with some settings and found a solution that seem to work fine in most cases.
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 12:17:52 am Hello Norman,
I wrote a very similar .vcl file yesterday evening, however it does not seem to work for me. Here is what I got so far. As you will notice there are a few debugging stuff but the concept is there anyway
|
|
Member since: Posts: 40 |
Thursday 19 February 2009 12:46:09 am This is what I currently have:
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 1:24:13 am You were right for the remove req.http.cookie; at the end of vcl_recv, it seems to work fine.
I finally came up with the following configuration, which is a bit different than yours but it seems to work. We (eZ) should really provide "official" Varnish configuration files....
|
|
Member since: Posts: 40 |
Thursday 19 February 2009 1:49:27 am The .vcl seems fine. I'll give it a try later today and see what happens.
I agree with you about the standard which should be supported by eZ, also the cookie "is_logged_in" cookie should be standard. Additionally we need to have a cookie like "has_user_data". For example when a anonymous user adds something to the basket or to the whishlist. This could easily done by adding a few lines to the modules. Currently I hacked the basket.php like:
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 2:15:31 am Actually I still got a problem with the issue described in your first post. My test was a false positive :/. I tried with your configuration file and mine, same problem in both cases.
But I am thinking about a potential workaround for this. To sum up the issue is the following : - You are anonymous, you get the page from Varnish or your local cache. - You log in and are redirected to the previously visited page and tadahh you get your local copy, which is of course not what you want, you want a fresh page, like if there is no-cache, no-store no-xxxx. The idea is the following : Since, in ezvlogin we control the way users are authenticated, how about adding a specific marker to Varnish to say "Hey I just loged in send no-cache|store|whatever because I want a fresh copy, and not my local one". This could be a cookie or a specific HTTP header. I would not like adding yet another cookie because we already have too much of them on the eZ Publish' plate... But I would prefer sending a specific HTTP header that Varnish could understand, something like : Just-Logged-in=yes, and if Varnish gets this header it returns no-cachexxxx and remove this header after that of course to keep things clean and clear. What do you think about this ? I will write a patch for ezvlogin anyway and see what happens, if it work then I will commit it to trunk.
|
|
Member since: Posts: 40 |
Thursday 19 February 2009 2:25:20 am How are your headers looking like?
Currently I use:
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 3:17:54 am Ha ok you use must-revalidate, not me.
Will add right away. |
|
Member since: Posts: 40 |
Thursday 19 February 2009 3:29:50 am Another thing I modified is the behavior of ETags within Apache.
I removed them all...
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 3:30:34 am Does not work either with your .vcl and mine, I tried with the following headers :
|
|
Member since: Posts: 40 |
Thursday 19 February 2009 3:36:13 am Try removing the Expires header
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 3:44:37 am This should not change things as Cache-Control should override Expires when both are set :
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
|
|
Member since: Posts: 40 |
Thursday 19 February 2009 3:48:37 am Take a look at http://www.all2e.com
Mit freundlichen Grüßen |
|
Member since: Posts: 22 |
Thursday 19 February 2009 3:58:19 am Well it seem that removing the Expires field helped.
This is weird though, good to know anyway :) |
|
Member since: Posts: 40 |
Thursday 19 February 2009 3:59:18 am
Mit freundlichen Grüßen |
|
Member since: Posts: 40 |
Thursday 19 February 2009 4:07:18 am Should we talk about skype ?
Mit freundlichen Grüßen |
|
Member since: Posts: 40 |
Thursday 19 February 2009 4:20:13 am I've tested a bit around and the .vcl seems to be fine now,
when working without the expires header:
Mit freundlichen Grüßen |
|
Member since: Posts: 40 |
Friday 20 February 2009 12:18:37 am Hi Jerome,
I found out that
Mit freundlichen Grüßen |
|
Member since: Posts: 40 |
Friday 20 February 2009 12:21:50 am Removing that part works fine.
Mit freundlichen Grüßen |
You need to be logged in to post messages in the forums. New users may register here.