Skip to content

Commit a6f8028

Browse files
authored
[dotnet] Handle the case when http response content type might be null (#10929)
Content type might be null
1 parent f7c2f02 commit a6f8028

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dotnet/src/webdriver/Remote/HttpCommandExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ private async Task<HttpResponseInfo> MakeHttpRequest(HttpRequestInfo requestInfo
282282
{
283283
HttpResponseInfo httpResponseInfo = new HttpResponseInfo();
284284
httpResponseInfo.Body = await responseMessage.Content.ReadAsStringAsync();
285-
httpResponseInfo.ContentType = responseMessage.Content.Headers.ContentType.ToString();
285+
httpResponseInfo.ContentType = responseMessage.Content.Headers.ContentType?.ToString();
286286
httpResponseInfo.StatusCode = responseMessage.StatusCode;
287287

288288
return httpResponseInfo;

0 commit comments

Comments
 (0)