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

HTTP Request and Response updates #150

Merged
merged 1 commit into from
Feb 22, 2021
Merged

HTTP Request and Response updates #150

merged 1 commit into from
Feb 22, 2021

Conversation

fabiocav
Copy link
Member

No description provided.

@fabiocav fabiocav force-pushed the fabiocav/httpresponse branch 4 times, most recently from 9390eca to 457b17e Compare February 22, 2021 20:05
_cookies = cookies;
}

public override void Append(string name, string value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a bit odd... if you look at the remarks for that documentation, it states that the value cannot be null (should be an empty string if not set). The exceptions documentation there also states that a null ref exception will be thrown if the value is null 🤷🏼‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

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

@fabiocav - I think from the code that null will become empty string by default: https://github.com/dotnet/runtime/blob/4893645536af64b01884ce5f3c392ad63513d04b/src/libraries/System.Net.Primitives/src/System/Net/Cookie.cs#L669

Found a related PR here: dotnet/corefx#8206 (which resolves this issue)

And an issue on the docs saying it will throw for null, which appears to be resolved but the docs look the same? :|

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, looks like a doc issue.


public bool? Secure { get; set; }

public string Value { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as earlier comment: string? Value?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same comment as above..... not sure we should add...

@fabiocav fabiocav force-pushed the fabiocav/httpresponse branch from 457b17e to c69d63c Compare February 22, 2021 21:14
@fabiocav fabiocav merged commit c69d63c into main Feb 22, 2021
@fabiocav fabiocav deleted the fabiocav/httpresponse branch February 22, 2021 23:11
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.

None yet

2 participants