Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request ContentType Check may throw NRE #78

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Jun 20, 2023

Ensure ContentType check handles possible null on synchronous code path too.

The asynchronous codepath already included the proper null coalescing operator:

https://github.com/elastic/elastic-transport-net/blob/fix/null-ref-synchronous-request/src/Elastic.Transport/Components/TransportClient/HttpTransportClient.cs#L155

Fixes: #76

Ensure ContentType check handles possible null on synchronous code path too.
Copy link

@technige technige left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

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

LGTM

@Mpdreamz Mpdreamz merged commit 5355efc into main Jun 20, 2023
3 checks passed
@Mpdreamz Mpdreamz deleted the fix/null-ref-synchronous-request branch June 20, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.4.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null reference exception in HttpTransportClient.Request ContentType check with ElasticCloud 8.8.1
3 participants