-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Content-Length no longer set when using Refit 4 #362
Comments
How are you making the request, what does your API look like? These headers are generally handled by the |
The test API I used was pretty basic, something like this:
I'm not sure, but after searching through the code based on what I know about ASP.NET Streams, their behavior changes when Flush()ing, I suspect this might be it: 879e3d1#diff-ef1e95d8d69943f1b3f91e27c7bd5986 With the change, the Length is no longer known. |
/cc @Cheesebaron, any ideas? |
I guess this is related to
This shouldn't change anything on how you receive streamed data server side. In ASP.NET it will be something like:
|
@Cheesebaron, do you reckon we should maybe make the push stream behaviour something that can be opted out of using a property on the |
@Cheesebaron agreed that it shouldn't change usage on the server side. Unfortunately, I am using it against a 3rd party API which requires it. |
I think opt-out is preferable. It's not that common for an API to require a content length from the client, is it? |
Not that I know off. I don't write my API's like that 😄 |
I am currently using
3.1.0
, theContent-Length
header is set on requests. After upgrading to4.0.1
, it is no longer set.The text was updated successfully, but these errors were encountered: