Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
fix(error): use resp instead of beresp in error delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jun 11, 2019
1 parent 35a9f81 commit dab068b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -653,17 +653,17 @@ sub hlx_deliver_type {
*/
sub hlx_deliver_error {
set req.http.X-Trace = req.http.X-Trace + "; hlx_deliver_error(" + beresp.status + ")";
if (beresp.status == 200) {
if (resp.status == 200) {
# TODO: fix headers
} else {
# error 954 "No error page found";
}

if (req.url.basename ~ "^([0-9][0-9][0-9])") {
set beresp.status = std.atoi(re.group.1);
set resp.status = std.atoi(re.group.1);
} else {
# this should never happen
set beresp.status = 500;
set resp.status = 500;
}
}

Expand Down

0 comments on commit dab068b

Please sign in to comment.