Page MenuHomePhabricator

Refine the "Mangled Webserver Response" setup check
ClosedPublic

Authored by epriestley on Mar 1 2019, 3:47 AM.
Tags
None
Referenced Files
F14093473: D20235.id48295.diff
Mon, Nov 25, 11:26 AM
Unknown Object (File)
Oct 15 2024, 9:52 PM
Unknown Object (File)
Oct 15 2024, 4:24 PM
Unknown Object (File)
Oct 8 2024, 10:32 PM
Unknown Object (File)
Oct 7 2024, 11:33 AM
Unknown Object (File)
Sep 19 2024, 2:32 PM
Unknown Object (File)
Sep 19 2024, 2:32 PM
Unknown Object (File)
Sep 19 2024, 2:25 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