fix(event_handlers): handle lack of headers when using auto-compression feature#1325
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure. |
c1e8779 to
981959a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1325 +/- ##
========================================
Coverage 99.88% 99.88%
========================================
Files 119 119
Lines 5427 5429 +2
Branches 619 620 +1
========================================
+ Hits 5421 5423 +2
Misses 2 2
Partials 4 4
Continue to review full report at Codecov.
|
heitorlessa
left a comment
There was a problem hiding this comment.
tiny change to address another potential error
Changing the order to prevent case_sensitive=True logic to kick in and fail on AttributeError, since None wouldn't have .get Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #1327
Summary
This PR add the ability use compress=True in decorator without throwing an error for a request containing null headers
Changes
get_header_valuefunction and return default if sotest_compress_no_accept_encoding_null_headersUser experience
Error for a request with empty/null headers to a method with
compress=True:'NoneType' object has no attribute 'items'", "errorType": "AttributeError"That was due to an error from api_gateway.py at line 212:
No more error, return default value as expected.
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.