Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

[check_ajp] Fix "or die" expressions. #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 14, 2021

  1. Fix "or die" expressions.

    Using || ends up binding too tightly to the operand on the left, so the `|| xdie` expressions never do anything because all of those trailing-parameters to system calls are not undefined.
    
    Changing them to `or xdie` causes them to actually do what you wanted them to do, which was actually terminate if a system call failed.
    
    I discovered this by using `check_ajp` across an stunnel setup where the remote server wouldn't properly handshake. The "pong" result ends up being the literal string `null` for some reason, but the real problem is that `sysread` is throwing a "Connection reset" error. `check_ajp` wasn't dying when `sysread` was throwing an error, so ... it continued and returned an UNKNOWN response.
    ChristopherSchultz authored Apr 14, 2021
    Configuration menu
    Copy the full SHA
    0d99c75 View commit details
    Browse the repository at this point in the history