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

.Net: [HB Planner] Content type fix #5133

Merged
merged 6 commits into from
Feb 23, 2024
Merged

Conversation

teresaqhoang
Copy link
Contributor

Motivation and Context

Resolves #5127: If the Content-Type header of a REST API JSON response includes a charset (e.g. Content-Type: application/json; charset=utf-8), the Handlebars prompt template handles the response as a string instead of as deserialized JSON.

This PR changes the check from strict equality to a check that determine if the content type simply contains application/json

Contribution Checklist

@teresaqhoang teresaqhoang self-assigned this Feb 23, 2024
@teresaqhoang teresaqhoang requested a review from a team as a code owner February 23, 2024 20:17
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Feb 23, 2024
@github-actions github-actions bot changed the title [HB Planner] Content type fix .Net: [HB Planner] Content type fix Feb 23, 2024
@teresaqhoang teresaqhoang added this pull request to the merge queue Feb 23, 2024
Merged via the queue into microsoft:main with commit d38b45d Feb 23, 2024
18 checks passed
@teresaqhoang teresaqhoang deleted the json-fix branch February 23, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

.Net: Handlebars prompt template doesn't deserialize JSON response when Content-Type includes charset
5 participants