| varnishtest "A successful unsafe method (POST for instance) on a cached entry must disable it." |
| feature ignore_unknown_macro |
| expect req.url == "/cached" |
| txresp -hdr "Cache-Control: max-age=5" \ |
| expect req.url == "/cached" |
| expect req.method == "POST" |
| expect req.url == "/cached" |
| txresp -hdr "Cache-Control: max-age=5" \ |
| ${no-htx} option http-use-htx |
| http-request cache-use my_cache |
| server www ${s1_addr}:${s1_port} |
| http-response cache-store my_cache |
| http-response set-header X-Cache-Hit %[res.cache_hit] |
| client c1 -connect ${h1_fe_sock} { |
| expect resp.status == 200 |
| expect resp.bodylen == 150 |
| txreq -method "POST" -url "/cached" -bodylen 100 |
| expect resp.status == 200 |
| expect resp.http.X-Cache-Hit == 0 |
| expect resp.status == 200 |
| expect resp.bodylen == 100 |
| expect resp.http.X-Cache-Hit == 0 |