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

Bug fix. Response cookie with empty domain fails #2015

Merged

Conversation

fcastells
Copy link
Contributor

@fcastells fcastells commented Mar 4, 2023

Description

Related to issue 1792

When a response contains a Cookie header with an empty domain, the .NET library that parses the cookie throws an exception. This PR ignores cookie parsing exceptions so that the request does not fail due to malformed cookies. Instead, the cookie is ignored and the header is still accessible through the response headers.

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@dnfadmin
Copy link

dnfadmin commented Mar 4, 2023

CLA assistant check
All CLA requirements met.

@fcastells fcastells changed the title Bug response cookie with empty domain fails Bug fix. Response cookie with empty domain fails Mar 4, 2023
@alexeyzimarev alexeyzimarev merged commit 1d289f9 into restsharp:v109 Mar 4, 2023
alexeyzimarev added a commit that referenced this pull request Mar 12, 2023
* Added .NET Framework 471 as a target. .NET 5 is out
* Fix the media type issue with .NET 7 #1969
* `IRestClient` Interface is back
* String type for ContentType
* Added Authenticator to RestRequest
* Made Options immutable to make the client thread-safe
* Ignore exceptions parsing response cookies (#2015)
* V109 (#2010)
* Added a simple factory with opt-in

---------

Co-authored-by: Francesc Castells <fcastells76@gmail.com>
Co-authored-by: Francesc Castells <francesc.castells@sermo.com>
Co-authored-by: Edward Lichtman <E.Lichtman2@gmail.com>
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

3 participants