Conversation
msrest/pipeline/universal.py
Outdated
| 'text/json' # Because we're open minded people... | ||
| ] | ||
| # Accept "text" because we're open minded people... | ||
| JSON_REGEXP = re.compile(r'(application|text)/([a-z+.]+\+)?json') |
There was a problem hiding this comment.
This still won't match content types with parameters:
Example: Content-type: application/json; charset=utf-8
Not blocking the PR for this. Just letting you know...
There was a problem hiding this comment.
Unless the parameters have already been stripped off (which it looks like they may have been at this point)
There was a problem hiding this comment.
Yes, they have at this point (see a little later in the file).
| assert result["success"] is True | ||
|
|
||
| # JSON with UTF-8 BOM | ||
| response = build_response(b'\xef\xbb\xbf{"success": true}', content_type="application/json; charset=utf-8") |
There was a problem hiding this comment.
Isn't adding a BOM in violation of https://tools.ietf.org/html/rfc7158#section-8.1?
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 87.84% 87.84% +<.01%
==========================================
Files 25 25
Lines 2583 2584 +1
==========================================
+ Hits 2269 2270 +1
Misses 314 314
Continue to review full report at Codecov.
|
Fix #140