firecracker
firecracker copied to clipboard
MMDS: Make header parsing case-insensitive
Reason for This PR
The MMDS API requires the X to be uppercased in header names (e.g. X-metadata-token). According to the HTTP1 spec, headers should be ignorant of capitalisation, and because of this libraries like hyper automatically lowercase all header names. Because of this, some HTTP clients cannot send requests to the MMDS API.
Description of Changes
Make the header parsing for MMDS ignorant to casing.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
- [x] All commits in this PR are signed (
git commit -s). - [ ] The issue which led to this PR has a clear conclusion.
- [ ] This PR follows the solution outlined in the related issue.
- [x] The description of changes is clear and encompassing.
- [x] Any required documentation changes (code and docs) are included in this PR.
- [x] Any newly added
unsafecode is properly documented. - [x] Any API changes follow the Runbook for Firecracker API changes.
- [ ] Any user-facing changes are mentioned in
CHANGELOG.md. - [x] All added/changed functionality is tested.
@luminitavoicu Saw that one test failed, I created a commit now which fixes that test!
I've updated the PR again to fix the tests, now there should be 0 change in behaviour and error logging.
Ah, there was still a test that verified an error message that I've changed and I hadn't signed all commits. Apologies for failing the tests each time, now it should work 😅
Updated PR! 👍
Squashed and signed! 👍
@CompuIves you need to rebase your PR so that we can go ahead with the merge
@CompuIves do you still want to merge this functionality? Thanks!
I would really like to see this PR merged - @CompuIves do you plan to handle this in the near future or should I open a separate PR/somehow get permission to edit this one if possible? I think there is just the rebase missing.
I would really like to see this PR merged - @CompuIves do you plan to handle this in the near future or should I open a separate PR/somehow get permission to edit this one if possible? I think there is just the rebase missing.
@ValentaTomas one way of getting this merged would be to cherry-pick this commit into a fork of yours and open a new PR with it. Make sure to add "Co-authored by" in the commit so that we make sure @CompuIves is also mentioned there. WDYT?
Moved to #3180.