Skip to content

Commit fd7f4da

Browse files
committed
less strict mimetype checking, can contain charset information (old httpconnection) (#4213)
(cherry picked from commit bfca7ed)
1 parent aa1b967 commit fd7f4da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private static bool SetSpecialTypes<TResponse>(string mimeType, byte[] bytes, IM
166166
else if (responseType == typeof(DynamicResponse))
167167
{
168168
//if not json store the result under "body"
169-
if (mimeType != RequestData.MimeType)
169+
if (!mimeType.StartsWith(RequestData.MimeType))
170170
{
171171
var dictionary = new DynamicDictionary();
172172
dictionary["body"] = new DynamicValue(bytes.Utf8String());

0 commit comments

Comments
 (0)