-
Notifications
You must be signed in to change notification settings - Fork 1
feat: remove libexpat dependency #1
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
Luacheck Report5 tests 5 ✅ 0s ⏱️ Results for commit 3b8fc8f. ♻️ This comment has been updated with latest results. |
@@ -314,6 +312,7 @@ describe("operations protocol", function() | |||
|
|||
assert.same({ | |||
headers = { | |||
["Accept"] = 'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever and this would be much better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes!
Some Lua files are using the XML-based AWS STS API, and they require bindings based on the libexpat c library to parse the XML, which requires that the expat library be installed for OpenResty; this library has a specific requirement for a version of the expat codebase, which is not available in the repositories of the major Linux distributions, and can only be installed from source. This creates a barrier to building and distributing the software.
However that the AWS STS API doesn't have to use XML as a response format, it also supports JSON, allowing us to parse it directly in cjson.
This PR makes the change to remove the expat dependency and change the two Credentials methods that currently rely on XML to JSON. This will modify the request headers on all service API calls, but is not expected to have an impact since those APIs originally used JSON.