| varnishtest "Test the errofile directive in proxy sections" |
| # This config tests the errorfile directive in proxy sections (including the |
| feature ignore_unknown_macro |
| errorfile 400 ${testdir}/errors/400.http |
| errorfile 403 ${testdir}/errors/403.http |
| errorfile 403 ${testdir}/errors/403-1.http |
| http-request deny deny_status 400 if { path /400 } |
| http-request deny deny_status 403 if { path /403 } |
| http-request deny deny_status 408 if { path /408 } |
| http-request deny deny_status 500 if { path /500 } |
| client c1r1 -connect ${h1_fe1_sock} { |
| expect resp.status == 400 |
| expect resp.http.x-err-type == "default" |
| client c1r2 -connect ${h1_fe1_sock} { |
| expect resp.status == 403 |
| expect resp.http.x-err-type == "errors-1" |
| client c1r3 -connect ${h1_fe1_sock} { |
| client c1r4 -connect ${h1_fe1_sock} { |