<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 12/17/15 9:49 AM, Xavier Cardil Coll
wrote:<br>
</div>
<blockquote
cite="mid:CALnwMoD3XtRL0H2Te4qyBPozpSbDA7kpHs-yeH41YDujPDHmnQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi, I am using this config for a
wordpress-woocommerce with mod_pagespeed, but something weird
happens on when I try to log in or register a user. I have made
sure the /my-account/ is not cached and that the POST request to
send the data at login / register is not cached, actually it
works. Users login and register, but after one of those actions,
the server returns the same form page with the form being empty,
while it should return the "my account" page with the data of
the user logged in. Can you please shed some light ?
<div><br>
</div>
<div>Here is the pasta of my config : <a moz-do-not-send="true"
href="http://pastebin.com/3NnW0Sbp">http://pastebin.com/3NnW0Sbp</a></div>
<div><br>
</div>
<div>Thanks !<br>
<div>
<div><br>
</div>
-- <br>
</div>
</div>
</div>
</blockquote>
<br>
Hi Xavier,<br>
<br>
Two things jump out at me.<br>
<br>
1) You have several matching rules with extraneous '*' characters.
For example, your vcl line 91<br>
<br>
<meta charset="utf-8">
<span class="re0" style="color: rgb(177, 0, 177); font-weight: bold;
font-family: Consolas, Menlo, Monaco, 'Lucida Console',
'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; letter-spacing: normal; line-height: 24px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;"><span class="kw1" style="color:
rgb(0, 177, 0); font-weight: bold;">if</span></span><span
style="color: rgb(51, 51, 51); font-family: Consolas, Menlo,
Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(248, 248, 248);"><span
class="Apple-converted-space"> </span></span><span class="sy0"
style="color: rgb(51, 204, 51); font-family: Consolas, Menlo,
Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">(</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">req.url
~ "</span><span class="co3" style="color: rgb(51, 204, 51);
font-family: Consolas, Menlo, Monaco, 'Lucida Console',
'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">^/</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">(</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">cart</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">my-account/*</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">checkout</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">addons</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">logout</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">lost-password</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">|</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">product/*</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">)</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);">"</span><span
class="sy0" style="color: rgb(51, 204, 51); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 24px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;">)</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, Menlo, Monaco, 'Lucida
Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera
Sans Mono', monospace, serif; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 24px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(248, 248, 248);"><span
class="Apple-converted-space"> </span>{</span><br>
<br>
Since we are using the "~" match, this might be better represented
by<br>
<br>
if ( req.url ~
"^(cart|my-account/|checkout|addons|logout|lost-password|product/)"
) {<br>
<br>
This isn't a problem, but it may make the usage clearer.<br>
<br>
<br>
2) Between lines 67 and 130 you have many test cases on when to
pass. Following that, you have a section that removes cookies,
including WordPress cookies, with no conditions. But I do not see
any VCL above line 130 that issues a pass based on the presence of a
WordPress cookie.<br>
<br>
It would help to see the varnishlog of what happens after the
POST/login and the cached page, but one likely possibility is a page
load that you aren't matching in lines 67-130 that is arriving
without the proper cookies.<br>
<br>
I would expect to see something like this before you start
un-setting cookies around line 140<br>
<br>
if (req.url ~
"^[^?]*\.(mp[34]|rar|tar|tgz|wav|zip|bz2|xz|7z|avi|mov|ogm|mpe?g|mk[av])(\?.*)?$")
{<br>
unset req.http.Cookie;<br>
return (hash);<br>
}<br>
<br>
if ( req.http.Cookie ~ "wordpress_" ) {<br>
return (pass);<br>
}<br>
<br>
This type of action might allow you to short-cut much of the "COOKIE
MADNESS" section by wrapping in a " if req.http.Cookie " check.<br>
<br>
Cheers,<br>
-=Mark<br>
<br>
</body>
</html>