Azure / Azure/api-management-developer-portal

incorrect content type handling

Open
#1,938 4 comments 0 reactions 0 assignees View on GitHub
(t) Bug (u) Test console P1
Dominant language
TypeScript
Stars
545
Forks
360
PR merge metrics
No merged PRs in 30d

Description

I have an API with returns json respose with header: content-type: application/json; charset=utf-8

If API has a long response (280KB) developer portal handles the response in about 2.5 mins. But Postman and API management in Azure handles it in 1 second. During investigation was found that formatXml method took most of the execution time.

Assuming the next code block is incorrect.
https://github.com/Azure/api-management-developer-portal/blob/f7b3ef0c46e03734e8917679ddc3cfc1d9cc6803/src/components/operations/operation-details/ko/runtime/operation-console.ts#L544
![Записати](https://user-images.githubusercontent.com/11892700/189295130-afe37932-22e2-4bb0-8cda-721df331add3.JPG)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/components/operations/operation-details/ko/runtime/operation-console.ts at the linked line and trace the formatXml call. Reproduce the reported case with a roughly 280 KB JSON response and compare the handling implied by the application/json; charset=utf-8 header. Done means the developer portal processes the response promptly without applying inappropriate or excessively slow formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
api, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.