nozzlegear / ShopifySharp

ShopifySharp is a .NET library that helps developers easily authenticate with and manage Shopify stores.
https://nozzlegear.com/shopify-development-handbook
MIT License
742 stars 308 forks source link

Fix #1001 CloneableRequestMessage fails to clone content and throws ObjectDisposed exception #1002

Closed nozzlegear closed 7 months ago

nozzlegear commented 7 months ago

This pull request fixes a bug where the CloneableRequestMessage underlying the LeakyBucketExecutionPolicy and the RetryExecutionPolicy classes would fail to clone the request's content if the request wasn't using JsonContent. It also fixes a bug that caused the original request to be disposed before the leaky bucket got a succesful response, thereby throwing an ObjectDisposedException.


@clement911 I've temporarily reverted your changes for the 7.0 release so I could publish this (the action only publishes from one branch at the moment). I have some refactors and breaking changes I want to do for 7.0, so I've moved it to the branch 7.0-dev and will open an issue tomorrow or Tuesday explaining my goals for 7.0!

I'll get the action set up to publish from both branches as well so we can start publishing the 7.0 prereleases without merging them into master.