Page MenuHomePhabricator

Refine the "Mangled Webserver Response" setup check
ClosedPublic

Authored by epriestley on Mar 1 2019, 3:47 AM.
Tags
None
Referenced Files
F13178917: D20235.diff
Wed, May 8, 8:47 PM
Unknown Object (File)
Tue, May 7, 11:44 AM
Unknown Object (File)
Mon, May 6, 3:08 PM
Unknown Object (File)
Mon, May 6, 2:52 PM
Unknown Object (File)
Sun, May 5, 9:06 PM
Unknown Object (File)
Sat, May 4, 6:14 PM
Unknown Object (File)
Fri, Apr 26, 2:47 AM
Unknown Object (File)
Wed, Apr 24, 9:56 PM
Subscribers
None

Details

Summary

Ref T13259. In some configurations, making a request to ourselves may return a VPN/Auth response from some LB/appliance layer.

If this response begins or ends with whitespace, we currently detect it as "extra whitespace" instead of "bad response".

Instead, require that the response be nearly correct (valid JSON with some extra whitespace, instead of literally anything with some extra whitespace) to hit this specialized check. If we don't hit the specialized case, use the generic "mangled" response error, which prints the actual body so you can figure out that it's just your LB/auth thing doing what it's supposed to do.

Test Plan
  • Rigged responses to add extra whitespace, got "Extra Whitespace" (same as before).
  • Rigged responses to add extra non-whitespace, got "Mangled Junk" (same as before).
  • Rigged responses to add extra whitespace and extra non-whitespace, got "Mangled Junk" with a sample of the document body instead of "Extra Whitespace" (improvement).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable