- Notifications
You must be signed in to change notification settings - Fork353
AddContent
to allHttpResponseMessage
s#387
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
AddContent
to allHttpResponseMessage
s#387
Uh oh!
There was an error while loading.Please reload this page.
Conversation
-fix#386 - reenable `net6.0` tests disabled in#384 for this issue- also, check `Stream.CanSeek` less when calculating `HttpMessageContent.ContentLength` value - use inner `HttpContent.Headers.ContentLength` if available - this changes behaviour slightly for both requests and responses - observable as `HttpMessageContent.Headers.ContentLength!=null` for empty messages - for responses, avoids `ContentLength==null` versus `ContentLength==0` inconsistencies (depending on platform) - `ContentLength==null` may still occur in some corner cases (which existed before) - e.g. when inner `HttpContent` doesn't know its length and `ReadAsStreamAsync()` hasn't completed- main change means `HttpResponseMessage`s we expose to user code are consistent across platforms - note: user code won't see `EmptyContent` in `HttpResponseMessage`s we create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This version looks fine, but you say you're still seeing other issues?
Not yet. I suspect there be a few more gremlins in |
HttpResponseMessage.Content == null
to user code #386net6.0
tests disabled inTest Formatting assemblies w/net6.0
#384 for this issueStream.CanSeek
less when calculatingHttpMessageContent.ContentLength
valueHttpContent.Headers.ContentLength
if availableHttpMessageContent.Headers.ContentLength!=null
for empty messagesContentLength==null
versusContentLength==0
inconsistencies (depending on platform)ContentLength==null
may still occur in some corner cases (which existed before)HttpContent
doesn't know its length andReadAsStreamAsync()
hasn't completedHttpResponseMessage
s we expose to user code are consistent across platformsEmptyContent
inHttpResponseMessage
s we create