I pushed a commit with a different implementation, controlled by a module parameter http_response_trim -- you have to set it to 1 to eneable the feature.
It removes all the white spaces from the beginning and end of the response, because I added another feature that allows to return the full http response instead of only first line.
Testing and feedback will be appreciated, for now I close this item.
—
Reply to this email directly or view it on GitHub.