Skip to content

Conversation

@ninzavivek
Copy link
Contributor

@ninzavivek ninzavivek commented May 16, 2020

If CNS Client happen to use a library which checks for the content type before decoding the response ( ex: Python -aiohttp, then reading the response will always fail.

We are defaulting to "Content-Type: text/plain; charset=utf-8"

As the response is always JSON ended. The fix basically always add the Content-Type header as "application/json; charset=UTF-8"

@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #561 into master will decrease coverage by 1.37%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
- Coverage   49.22%   47.85%   -1.38%     
==========================================
  Files          28       27       -1     
  Lines        3437     3281     -156     
==========================================
- Hits         1692     1570     -122     
+ Misses       1455     1434      -21     
+ Partials      290      277      -13     

Copy link

@chandanAggarwal chandanAggarwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ninzavivek
Copy link
Contributor Author

Considering the response is always JSON encoded, I think it is fine.

@ninzavivek ninzavivek merged commit 4b1ed1e into Azure:master May 17, 2020
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.

Set the Content-Type header to ""application/json; charset=UTF-8"

5 participants