-
Notifications
You must be signed in to change notification settings - Fork 421
fix(event_handler): convert null body to empty string in ALBResolver to avoid HTTP 502 #4683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…to avoid HTTP 502
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4683 +/- ##
===========================================
+ Coverage 96.38% 96.46% +0.07%
===========================================
Files 214 223 +9
Lines 10030 10735 +705
Branches 1846 1998 +152
===========================================
+ Hits 9667 10355 +688
- Misses 259 268 +9
- Partials 104 112 +8 ☔ View full report in Codecov by Sentry. |
|
…tion Signed-off-by: heitorlessa <[email protected]>
@sthulb we're gonna need your approval to get this ready as a pre-release tomorrow, once @leandrodamascena adds E2E test for this tricky ALB thing. On my way to PTO <3 |
Issue number: #4671
Summary
Auto convert
None
body responses to empty strings when aResponse
object is used. By default, ALB raises a HTTP 502 if body isnull
.This differs from other resolvers (API GW, Lattice, Function URL).
Docs. To prevent another confusion, this PR updates the doc to move a auto-serialization banner into its own sub-section to explain why a
dict
in the route function will always end up insidebody
key.Changes
None
response body to empty string""
Auto-serialization
piecejson.dumps(None)
vs""
in the bodynull
(json NONE) is treated as 4 bytes content-length""
is honoured and sends no content-lengthcontent-type
also impacts ALB behaviour if aResponse
object w/o is returnedUser experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.