Skip to content
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

xml_parser does not support empty tags #1165

Closed
1 task
rvansa opened this issue Nov 7, 2024 · 1 comment
Closed
1 task

xml_parser does not support empty tags #1165

rvansa opened this issue Nov 7, 2024 · 1 comment
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue

Comments

@rvansa
Copy link

rvansa commented Nov 7, 2024

Describe the bug

I am trying to connect using aws-c-s3 to a localstack instance. On listing objects in a bucket localstack replies with

<?xml version='1.0' encoding='utf-8'?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01\">
  <IsTruncated>false</IsTruncated>
  <Name>foo</Name>
  <Prefix />
  <MaxKeys>1000</MaxKeys>
  <EncodingType>url</EncodingType>
  <KeyCount>1</KeyCount>
  <Contents> (redacted) </Contents>
</ListBucketResult>

but xml_parser is unable to parse empty tag <Prefix />: it ignores that it is an empty tag and looks for </Prefix>, failing to parse the document.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Valid XML is parsed.

Current Behavior

Parser logs XML document is invalid. and returns error.

Reproduction Steps

Try to parse

<?xml version='1.0' encoding='utf-8'?>
<foo><bar /></foo>

Possible Solution

No response

Additional Information/Context

No response

aws-c-common version used

v0.9.27

Compiler and version used

GCC 11.2

Operating System and version

Linux

@rvansa rvansa added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 7, 2024
@jmklix
Copy link
Member

jmklix commented Nov 12, 2024

Thanks for finding this bug. We have a PR that should fix this: #1168

@jmklix jmklix added closing-soon This issue will automatically close in 5 days unless further comments are made. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Nov 12, 2024
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 5 days unless further comments are made. labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants