sub _respond { my($heap, $request_id, $request) = @_; my $response = $request->[REQ_RESPONSE]; if ($heap->{frmax}) { if ($heap->{redir}->{$request_id}->{followed}) { # ... } else { my $tmpresponse = $response; while (defined ...) { my $prev = $heap->{redir}->{$request_id}->{from}; $tmpresponse->previous(...); $tmpresponse = $tmpresponse->previous(); $request_id = $prev; } } } $request->[REQ_POSTBACK]->($response); }