Skip to content

Fixed content type header check in aquery.#36

Open
marek-jelo-jelinek wants to merge 1 commit into
jaraco:mainfrom
marek-jelo-jelinek:main
Open

Fixed content type header check in aquery.#36
marek-jelo-jelinek wants to merge 1 commit into
jaraco:mainfrom
marek-jelo-jelinek:main

Conversation

@marek-jelo-jelinek

Copy link
Copy Markdown

This PR improves the way the Content-Type header is validated for XML responses in aquery. Previously, the code depended on an exact string match (text/xml;charset=utf-8), which could fail if the header used a different case, parameter order, or the application/xml type.

The new approach is more flexible and should reliably handle any minor changes to the header on the server side.

@codetasks

Copy link
Copy Markdown

Verified against the live API on 2026-06-07: the endpoint now returns Content-Type: text/xml; charset=utf-8 (space after the semicolon), which fails the old exact match but passes this patch's checks. This unblocks #35 and downstream consumers (e.g. the mcp-wolfram-alpha MCP server, fully broken since the header change). LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants